Discover the data and metrics extracted by bundle-stats for each section.
Assets
The list of assets generated by the bundler
- webpack ignores assets that match
excludeAssets
webpack stats option - bundle-stats ignores assets with
.map
and.LICENSE.txt
extensions
Data
Name | Description |
---|---|
Size | The size of the file produced by the bundler |
Asset type | The bundler asset type: entry , initial , chunk , other |
File type | The output file type: JS , CSS , IMG , Media , Fonts , HTML , Other |
Metrics
Name | Description | Change up/down |
---|---|---|
Bundle Size | The total file size of the assets generated or processed by the bundler | regression /improvement |
Total size by type | The total file size by file type(ex: CSS , JS , IMG , Media , Fonts , Html , and Other ) | regression /improvement |
Initial JS | The total file size of the JavaScript initial chunks | regression /improvement |
Initial CSS | The total file size of the CSS initial chunks | regression /improvement |
Cache Invalidation | The ratio between the total of the changed assets and the total file size(Bundle Size) | neutral |
Chunks | The total number of chunks generated by the bundler | neutral |
Assets | Total number of assets generated by the bundler | neutral |
About asset path normalization
To identify and compare assets between different builds, bundle-stats extracts the hash from the file path when possible:
Hash digest | Bundler asset file path | bundle-stats asset normalized file path |
---|---|---|
hex | assets/vendors.abc1234.js assets/vendors-abc1234.js assets/vendors_abc1234.js assets/vendors.abc1234.js | assets/vendors.js |
base64 | assets/vendors.fGEff4Ab.js assets/vendors~fGEff4Ab.js | assets/vendors.js |
To update your bundle configuration to use a common pattern for asset file paths, follow the corresponding guide:
Modules
List of modules bundled by webpack
- webpack ignores modules that match
excludeModules
webpack stats option - bundle-stats ignores modules that are not bundled into any chunks
Data
Name | Description |
---|---|
Size | Webpack - module source size before any production optimization(ex: terser minification) Vite - module rendered size(default) or module source size when stats are outputed with moduleOriginalSize: true |
Source | First/Third party code |
Chunk | Parent asset chunk |
File type | Module file type: JS , CSS , Other |
Metrics
Name | Description | Change up/down |
---|---|---|
Modules | The total number of bundled modules | neutral |
Duplicate Modules (bundle-stats@3.3.0 ) | The total number of modules that belong to more than one chunk | regression /improvement |
Duplicate Code (bundle-stats@3.3.0 ) | The percentage of total duplicate module size from the total module size | neutral |
From bundle-stats@v4, the modules metric counts all the duplicate module instances - bundle-stats#2122.
v1-v3 | v4 | |
---|---|---|
modules | 100 | 110 |
duplicateModules | 10 | 10 |
Packages
List of bundled packages
Data
Name | Description |
---|---|
Size | The package total module size |
Metrics
Name | Description | Change up/down |
---|---|---|
Packages | The total number of bundled packages | regression /improvement |
Duplicate Packages | The total number of duplicate packages | regression /improvement |