BundleMate
What is that?
BundleMate is a CLI tool for bundle size optimization.
This module is going to help you:
- Find out what are the biggest dependencies in your package in terms of size
- Identify duplicated dependencies
- Compare dependencies and duplicates of different versions of the same package
- Figure our what dependencies were added and removed in the later version of the package
- Optimize the bundle size!
Installation
npm i bundlemate -g
Usage
To identify dependencies and duplicates in your package, simply use the following command:
bundlemate -p packageName@version
where -p
flag is used to specify the name of the package.
To compare two or more versions of a package, list packages one after another:
bundlemate -p packageName@version1 -p packageName@version2
For example, let's compare two versions of @atlaskit/editor-core
package.
bundlemate -p @atlaskit/editor-core@37.1.0 -p @atlaskit/editor-core@39.5.0
BundleMate will install dependencies, create bundles for each version of the package and generate you the report.
Inspired by webpack-bundle-analyzer