bundle-stats 4.21.5 → 4.21.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -8
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
<p align="center">
|
|
5
5
|
Demos:
|
|
6
|
-
<a href="https://relative-ci.com/bundle-analyzer/bundle-stats/demo/bundle-analysis-comparison" target="_blank">Bundle analysis comparison</a
|
|
6
|
+
<a href="https://relative-ci.com/bundle-analyzer/bundle-stats/demo/bundle-analysis-comparison" target="_blank">Bundle analysis comparison</a>·
|
|
7
7
|
<a href="https://relative-ci.com/bundle-analyzer/bundle-stats/demo/bundle-analysis" target="_blank">Bundle analysis</a>
|
|
8
8
|
</p>
|
|
9
9
|
<h1 align="center">BundleStats</h1>
|
|
10
10
|
<p align="center">
|
|
11
|
-
Analyze bundle stats(bundle size, assets, modules, packages) and compare the results between different builds. Support for webpack
|
|
11
|
+
Analyze bundle stats(bundle size, assets, modules, packages) and compare the results between different builds. Support for webpack/rspack and vite/rolldown/rollup using <a href="https://github.com/relative-ci/bundle-stats/blob/master/packages/cli/README.md#viterolluprolldown-stats">rollup-plugin-webpack-stats</a>.
|
|
12
12
|
</p>
|
|
13
13
|
<p align="center">
|
|
14
14
|
<a href="https://www.npmjs.com/package/bundle-stats"><img src="https://img.shields.io/npm/v/bundle-stats.svg" /></a>
|
|
@@ -64,9 +64,13 @@ or
|
|
|
64
64
|
yarn add --dev bundle-stats
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
## Output
|
|
67
|
+
## Output stats
|
|
68
68
|
|
|
69
|
-
The CLI
|
|
69
|
+
The CLI expects stats files that follow the webpack stats schema. Follow the guides below to learn how to export compatible output from webpack/rspack or from vite/rollup/rolldown.
|
|
70
|
+
|
|
71
|
+
### webpack/rspack stats
|
|
72
|
+
|
|
73
|
+
You can customize the contents of the generated stats file by configuring the [webpack stats options](https://webpack.js.org/configuration/stats):
|
|
70
74
|
|
|
71
75
|
```js
|
|
72
76
|
{
|
|
@@ -82,16 +86,29 @@ The CLI is consuming the Webpack stats JSON file. The following [webpack stats o
|
|
|
82
86
|
}
|
|
83
87
|
```
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
To output the the webpack stats JSON file you can use:
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
#### 1. [webpack-cli](https://www.npmjs.com/package/webpack-cli) `--json` option:
|
|
88
92
|
|
|
89
93
|
```shell
|
|
90
94
|
npx webpack --mode production --json artifacts/webpack-stats.json
|
|
91
95
|
```
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
[Guide & examples: How to output webpack stats using the CLI](https://relative-ci.com/documentation/guides/webpack-stats/webpack-cli)
|
|
98
|
+
|
|
99
|
+
#### 2. using `webpack-stats-plugin`
|
|
100
|
+
|
|
101
|
+
[Guide & examples: How to output webpack stats JSON file using webpack-stats-plugin](https://relative-ci.com/documentation/guides/webpack-stats/webpack-stats-plugin)
|
|
102
|
+
|
|
103
|
+
##### Learn more
|
|
104
|
+
- [Guide: How to configure webpack for better debugging and monitoring](https://relative-ci.com/documentation/guides/webpack-config)
|
|
105
|
+
|
|
106
|
+
### vite/rollup/rolldown stats
|
|
107
|
+
|
|
108
|
+
[Guide & examples: How to output stats in Vite](https://relative-ci.com/documentation/guides/bundle-stats/vite)
|
|
109
|
+
|
|
110
|
+
#### Learn more
|
|
111
|
+
- [Guide How to configure vite for better debugging and monitoring](https://relative-ci.com/documentation/guides/vite-config)
|
|
95
112
|
|
|
96
113
|
## Usage
|
|
97
114
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bundle-stats",
|
|
3
|
-
"version": "4.21.
|
|
3
|
+
"version": "4.21.7",
|
|
4
4
|
"description": "In-depth bundle analyzer for webpack(bundle size, assets, modules, packages)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"bundle-stats": "bin/index.js"
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/cli#readme",
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@bundle-stats/cli-utils": "
|
|
55
|
-
"@bundle-stats/plugin-webpack-filter": "
|
|
56
|
-
"@bundle-stats/plugin-webpack-validate": "
|
|
57
|
-
"@bundle-stats/utils": "
|
|
54
|
+
"@bundle-stats/cli-utils": "4.21.7",
|
|
55
|
+
"@bundle-stats/plugin-webpack-filter": "4.21.7",
|
|
56
|
+
"@bundle-stats/plugin-webpack-validate": "4.21.7",
|
|
57
|
+
"@bundle-stats/utils": "4.21.7",
|
|
58
58
|
"boxen": "^5.0.0",
|
|
59
59
|
"core-js": "^3.21.0",
|
|
60
60
|
"fs-extra": "^11.0.0",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"yargs": "^17.4.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@playwright/test": "1.56.
|
|
67
|
+
"@playwright/test": "1.56.1",
|
|
68
68
|
"@types/fs-extra": "^11.0.0",
|
|
69
69
|
"@types/listr": "^0.14.4",
|
|
70
70
|
"@types/yargs": "^17.0.20",
|
|
71
71
|
"http-server": "14.1.1",
|
|
72
72
|
"jest": "29.7.0",
|
|
73
|
-
"rimraf": "6.
|
|
73
|
+
"rimraf": "6.1.2",
|
|
74
74
|
"typescript": "5.9.3"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "4bb63243b2b2d9616f3ccbe109fd4ff5aca7693a"
|
|
77
77
|
}
|