You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Webpack Bundle Tracker [](https://gitter.im/owais/webpack-bundle-tracker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Spits out some stats about webpack compilation process to a file.
6
6
@@ -16,9 +16,10 @@ This project is compatible with NodeJS versions 16 and up.
16
16
17
17
:warning: Starting on version 17, NodeJS uses OpenSSL v3 which has compatibility issues with Webpack@4. This isn't an issue for Webpack@5, however
18
18
if you're using Node >= 17 and Webpack@4, to properly use this package you must ensure to set the `NODE_OPTIONS=--openssl-legacy-provider` environment
19
-
variable. You can read more about this on https://github.com/webpack/webpack/issues/14532.
19
+
variable. You can read more about this on https://github.com/webpack/webpack/issues/14532.
20
20
21
21
## Migrating from version 1.x.y to 2.x.y
22
+
22
23
Starting on version 2.0.0, when creating a new instance of `BundleTracker`, the usage of the `path` parameter has been fixed and it's now being used to generate the output path for the stats file, together with the `filename` parameter. On version 2.0.0, if the `path` parameter is ommited from the constuctor call, it will attempt to place the stats file at the `output.path` directory (if also ommited, will use `'.'` as a fallback). Also, version 2.0.0 doesn't allow sub-directories to be included on the `filename`, only allowing to include them on the `path` param. To avoid those issues, when migrating, double-check if the file placement is as expected. The usage of these parameters is documented [here](#usage) and [here](#options).
23
24
24
25
## Usage
@@ -92,9 +93,7 @@ And in case `logTime` option is set to `true`, the output will look like,
92
93
{
93
94
"status": "done",
94
95
"chunks": {
95
-
"app": [
96
-
"app-0828904584990b611fb8.js"
97
-
]
96
+
"app": ["app-0828904584990b611fb8.js"]
98
97
},
99
98
"assets": {
100
99
"app-0828904584990b611fb8.js": {
@@ -181,7 +180,7 @@ passed to the `space` parameter in `JSON.stringify`. More information can be fou
|`path`|`{String}`|`'.'`| Output directory of bundle tracker JSON file. Will attempt to use `output.path` before falling back to the default value. |
183
+
|`path`|`{String}`|`'.'`| Output directory of bundle tracker JSON file. Will attempt to use `output.path` before falling back to the default value. |
185
184
|`filename`|`{String}`|`'webpack-stats.json'`| Name of the bundle tracker JSON file. |
186
185
|`publicPath`|`{String}`| (ignored) | Override `output.publicPath` from Webpack config. |
187
186
|`relativePath`|`{Boolean}`|`false`| Show relative path instead of absolute path for bundles in JSON Tracker file. Path are relative from path of JSON Tracker file. |
0 commit comments