RelativeCI uses bundle-stats to verify, filter and analyze webpack stats. Discover below the data and the metrics extracted for each section:
For projects using Vite/Rollup, check the How to output bundle stats JSON file on Vite guide.
Assets
The list of assets produced by the bundler
Asset size: The size of the file produced by the bundler
- webpack ignores assets that match
excludeAssets
webpack stats option - bundle-stats ignores assets with
.map
and.LICENSE.txt
extensions
Bundle Size
The total file size of the assets generated or processed by the bundler
bundle-stats extracts total metrics for each file type(ex: CSS
, JS
, IMG
, Media
, Fonts
, Html
, and Other
).
Initial JS
The total file size of the JavaScript initial chunks
Initial CSS
The total file size of the CSS initial chunks
Cache Invalidation
The ratio between the total of the changed assets and the total file size(Bundle Size
)
Chunks
The total number of chunks generated by the bundler
Assets
Total number of assets generated or produced by the bundler
Modules
- webpack ignores modules that match
excludeModules
webpack stats option - bundle-stats ignores modules that are not bundled into any chunks
Module size: module file size before any production optimization(ex: terser minification)
Modules
The total number of bundled modules
From bundle-stats@v4, the metric counts all the duplicate module instances - bundle-stats#2122.
v1-v3 | v4 | |
---|---|---|
modules | 100 | 110 |
duplicateModules | 10 | 10 |
Duplicate Modules
bundle-stats@3.3.0The total number of modules that belong to more than one chunk
Duplicate Code
bundle-stats@3.3.0The percentage of total duplicate module size from the total module size
Packages
Bundled packages
Package size: the total package's module size before any production optimization(ex: terser minification).
Packages
The total number of bundled packages
Duplicate Packages
The total number of duplicate packages