webpack-bundle-analyzer
Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap
File Explorer
- calm-assets-match.md
- calm-compilers-report.md
- changelog-generator.mjs
- config.json
- README.md
- main.yml
- release.yml
- install-test-webpack-versions.sh
- icon-arrow-right.svg
- icon-chunk.svg
- icon-folder.svg
- icon-invisible.svg
- icon-module.svg
- icon-moon.svg
- icon-pin.svg
- icon-sun.svg
- Button.css
- Button.jsx
- Checkbox.css
- Checkbox.jsx
- CheckboxList.css
- CheckboxList.jsx
- CheckboxListItem.jsx
- ContextMenu.css
- ContextMenu.jsx
- ContextMenuItem.css
- ContextMenuItem.jsx
- Dropdown.css
- Dropdown.jsx
- Icon.css
- Icon.jsx
- ModuleItem.css
- ModuleItem.jsx
- ModulesList.css
- ModulesList.jsx
- ModulesTreemap.css
- ModulesTreemap.jsx
- Search.css
- Search.jsx
- Sidebar.css
- Sidebar.jsx
- Switcher.css
- Switcher.jsx
- SwitcherItem.jsx
- ThemeToggle.css
- ThemeToggle.jsx
- Tooltip.css
- Tooltip.jsx
- Treemap.jsx
- types.js
- PureComponent.jsx
- .eslintrc.json
- localStorage.js
- store.js
- utils.js
- viewer.css
- viewer.jsx
- analyzer.js
- BaseFolder.js
- ConcatenatedModule.js
- ContentFolder.js
- ContentModule.js
- Folder.js
- Module.js
- Node.js
- utils.js
- analyzer.js
- BundleAnalyzerPlugin.js
- index.js
- Logger.js
- parseUtils.js
- sizeUtils.js
- statsUtils.js
- template.js
- utils.js
- viewer.js
- invalidBundle.js
- validBundleWithArrowFunction.js
- validBundleWithArrowFunction.modules.json
- validBundleWithEsNextFeatures.js
- validBundleWithEsNextFeatures.modules.json
- validBundleWithIIFE.js
- validBundleWithIIFE.modules.json
- validCommonBundleWithDedupePlugin.js
- validCommonBundleWithDedupePlugin.modules.json
- validCommonBundleWithModulesAsArray.js
- validCommonBundleWithModulesAsArray.modules.json
- validCommonBundleWithModulesAsObject.js
- validCommonBundleWithModulesAsObject.modules.json
- validExtraBundleWithModulesAsArray.js
- validExtraBundleWithModulesAsArray.modules.json
- validExtraBundleWithModulesInsideArrayConcat.js
- validExtraBundleWithModulesInsideArrayConcat.modules.json
- validExtraBundleWithNamedChunk.js
- validExtraBundleWithNamedChunk.modules.json
- validJsonpWithArrayConcatAndEntryPoint.js
- validJsonpWithArrayConcatAndEntryPoint.modules.json
- validNodeBundle.js
- validNodeBundle.modules.json
- validUmdLibraryBundleWithModulesAsArray.js
- validUmdLibraryBundleWithModulesAsArray.modules.json
- validWebpack4AsyncChunk.js
- validWebpack4AsyncChunk.modules.json
- validWebpack4AsyncChunkAndEntryPoint.js
- validWebpack4AsyncChunkAndEntryPoint.modules.json
- validWebpack4AsyncChunkUsingCustomGlobalObject.js
- validWebpack4AsyncChunkUsingCustomGlobalObject.modules.json
- validWebpack4AsyncChunkUsingSelfInsteadOfWindow.js
- validWebpack4AsyncChunkUsingSelfInsteadOfWindow.modules.json
- validWebpack4AsyncChunkUsingThisInsteadOfWindow.js
- validWebpack4AsyncChunkUsingThisInsteadOfWindow.modules.json
- validWebpack4AsyncChunkWithOptimizedModulesArray.js
- validWebpack4AsyncChunkWithOptimizedModulesArray.modules.json
- validWebpack4AsyncChunkWithWebWorkerChunkTemplatePlugin.js
- validWebpack4AsyncChunkWithWebWorkerChunkTemplatePlugin.modules.json
- validWebpack5LegacyBundle.js
- validWebpack5LegacyBundle.modules.json
- validWebpack5ModernBundle.js
- validWebpack5ModernBundle.modules.json
- .gitignore
- src.js
- webpack.config.js
- a-clone.js
- a.js
- b.js
- index.js
- bundle.js
- expected-chart-data.js
- stats.json
- stats.json
- app.js
- expected-chart-data.json
- stats.json
- bundle.js
- expected-chart-data.js
- stats.json
- bundle.js
- expected-chart-data.js
- stats.json
- config-1-main.js
- config-2-main.js
- stats.json
- invalid-chunk.js
- stats.json
- valid-chunk.js
- stats.json
- valid-chunk.js
- stats.json
- valid-chunk.js
- bundle.js
- stats.json
- bundle.js
- expected-chart-data.js
- stats.json
- expected-chart-data.js
- stats.json
- expected-chart-data.js
- stats.json
- stats.json
- bundle.js
- stats.json
- bundle.js
- expected-chart-data.js
- stats.json
- bundle.js
- bundle.worker.js
- stats.json
- 1.bundle.js
- 1.bundle.worker.js
- bundle.js
- bundle.worker.js
- stats.json
- with-children-array.json
- with-cjs-chunk.json
- with-invalid-dynamic-require.json
- with-modules-chunk.json
- .eslintrc.json
- .gitignore
- analyzer.js
- dev-server.js
- helpers.js
- Logger.js
- parseUtils.js
- plugin.js
- statsUtils.js
- utils.js
- viewer.js
- .babelrc
- .browserslistrc
- .editorconfig
- .gitignore
- .npm-upgrade.json
- .nvmrc
- .prettierignore
- CHANGELOG.md
- CONTRIBUTING.md
- eslint.config.mjs
- jest.config.js
- LICENSE
- package-lock.json
- package.json
- prettier.config.mjs
- README.md
- tsconfig.json
- webpack.config.js
# Installation Guide
node- Node.js >= 14.0.0
- npm or yarn latest
Setup Steps
npm install
Install project dependencies.
npm run build
Build the project.
npm test
Run the test suite.
Key Commands
npm install --save-dev webpack-bundle-analyzer
Install webpack-bundle-analyzer as a dev dependency.
npm run build
Build the source code to generate output files.
npm test
Run project tests using Jest.
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
brotli
View Details ▼
brotli
Compress/uncompress files with Brotli compression.
brotli {{path/to/file}}
Compress a file, creating a compressed version next to the file:
brotli {{[-d|--decompress]}} {{path/to/file.br}}
Decompress a file, creating an uncompressed version next to the file:
brotli {{path/to/file}} {{[-o|--output]}} {{path/to/compressed_output_file.br}}
Compress a file specifying the output filename:
gzip
View Details ▼
gzip
Compress/uncompress files with `gzip` compression (LZ77).
gzip {{path/to/file}}
Compress a file, replacing it with a `gzip` archive:
gzip {{[-d|--decompress]}} {{path/to/file.gz}}
Decompress a file, replacing it with the original uncompressed version:
gzip {{[-v|--verbose]}} {{path/to/file.gz}}
Display the name and reduction percentage for each file compressed:
npm install
View Details ▼
npm install
Install Node packages.
npm {{[i|install]}}
Install dependencies listed in `package.json`:
npm {{[i|install]}} {{package_name}}@{{version}}
Download a specific version of a package and add it to the list of dependencies in `package.json`:
npm {{[i|install]}} {{package_name}} {{[-D|--save-dev]}}
Download the latest version of a package and add it to the list of dev dependencies in `package.json`:
stat
View Details ▼
stat
Display file and filesystem information.
See also: `file`.
stat {{path/to/file}}
Display properties about a specific file such as size, permissions, creation date, and access date among others:
stat {{path/to/file}}
Show file properties such as size, permissions, creation date, and access date among others:
stat {{[-t|--terse]}} {{path/to/file}}
Display properties about a specific file, only showing the raw result data without labels:
webpack
View Details ▼
webpack
Bundle a web project's js files and other assets into a single output file.
webpack {{app.js}} {{bundle.js}}
Create a single output file from an entry point file:
webpack {{app.js}} {{bundle.js}} --module-bind '{{css=css}}'
Load CSS files too from the JavaScript file (this uses the CSS loader for CSS files):
webpack {{[-c|--config]}} {{webpack.config.js}} --progress
Pass a configuration file (with e.g. the entry script and the output filename) and show compilation progress:
yarn
View Details ▼
yarn
JavaScript and Node.js package manager alternative.
yarn global add {{module_name}}
Install a module globally:
yarn install
Install all dependencies referenced in the `package.json` file (the `install` is optional):
yarn add {{module_name}}@{{version}}
Install a module and save it as a dependency to the `package.json` file (add `--dev` to save as a dev dependency):
zstd
View Details ▼
zstd
Compress or decompress files with Zstandard compression.
zstd {{path/to/file}}
Compress a file into a new file with the `.zst` suffix:
zstd {{[-d|--decompress]}} {{path/to/file.zst}}
Decompress a file:
zstd {{[-d|--decompress]}} {{[-c|--stdout]}} {{path/to/file.zst}}
Decompress to `stdout`:
