Service Update: Upgrade to bundle-stats v3

May 25, 2021

To stay up to date with RelativeCI progress, follow us on Twitter, subscribe to our mailing list or subscribe to our feed

Sunday, May 30 2021 at 6:00 UTC we will be performing a service update. The new version will support bundle-stats v3 and will contain 2 changes in the way we extract metrics from webpack stats:

Support for concatenated modules

Module concatenation is a webpack optimization plugin that can decrease the total size of a bundle by merging eligible modules. Older versions of bundle-stats were extracting only the top-level module entries from the webpack stats. bundle-stats v3 is extracting all the concatenated modules if available and is generating a more complete view of the modules and packages included in the bundle.

What is going to change?

  1. Module list is going to contain a larger number of entries
  2. Modules metric is going to increase with the new corresponding number of modules. Depending on the size of your project and the webpack configuration, the number can be up to 150% larger.
  3. Packages metric might be larger due to the new module entries
  4. Duplicate packages metric might be larger due to the new package entries
ModulesModule count
Before (v2)./main.js + 2 modules

1

After (v2)/main.js
./module-a.js
./module-b.js

3

Action required: update @relative-ci/agent to v2

The change will be available once you start using @relative-ci/agent@2. You can try the feature right now by using the beta channel:

npm install --save-dev @relative-ci/agent@beta
# or
yarn add --dev @relative-ci/agent@beta

Update for duplicate packages metric

Previous versions of bundle-stats were counting duplicate packages uniquely by name. bundle-stats v3 counts every duplicate occurrence, causing a metric change if the build introduces a new duplicate instance.

PackagesDuplicate packages
Before (v2)node_modules/package-a
node_modules/package-a/node_modules/package-c
node_modules/package-b
node_modules/package-b/node_modules/package-a
node_modules/package-b/node_modules/package-c
node_modules/package-c

2

After (v3)node_modules/package-a
node_modules/package-a/node_modules/package-c
node_modules/package-b
node_modules/package-b/node_modules/package-a
node_modules/package-b/node_modules/package-c
node_modules/package-c

3

What is going to change?

  • Duplicate packages metric will increase if one of the existing duplicate packages is duplicated more than 2x

Action required - none

The change will be available for all projects after the service update.

If you have any questions, contact us via Email, Twitter or GitHub.