[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3422":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":15,"starSnapshotCount":15,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},3422,"webpack-bundle-analyzer","webpack\u002Fwebpack-bundle-analyzer","webpack","Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap",null,"JavaScript",12670,506,85,19,0,3,7,1,70.32,"MIT License",false,"main",[24,25,26,27,28,29,7,5],"analyze","bundle","chart","interactive","size","treemap","2026-06-12 04:00:17","[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![tests][tests]][tests-url]\n[![downloads][downloads]][downloads-url]\n\n\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwebpack\u002Fwebpack\">\n    \u003Cimg width=\"200\" height=\"200\"\n      src=\"https:\u002F\u002Fwebpack.js.org\u002Fassets\u002Ficon-square-big.svg\">\n  \u003C\u002Fa>\n  \u003Ch1>Webpack Bundle Analyzer\u003C\u002Fh1>\n  \u003Cp>Visualize size of webpack output files with an interactive zoomable treemap.\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\u003Ch2 align=\"center\">Install\u003C\u002Fh2>\n\n```bash\n# NPM\nnpm install --save-dev webpack-bundle-analyzer\n# Yarn\nyarn add -D webpack-bundle-analyzer\n```\n\n\u003Ch2 align=\"center\">Usage (as a plugin)\u003C\u002Fh2>\n\n```js\nconst { BundleAnalyzerPlugin } = require(\"webpack-bundle-analyzer\");\n\nmodule.exports = {\n  plugins: [new BundleAnalyzerPlugin()],\n};\n```\n\nIt will create an interactive treemap visualization of the contents of all your bundles.\n\n![webpack bundle analyzer zoomable treemap](https:\u002F\u002Fcloud.githubusercontent.com\u002Fassets\u002F302213\u002F20628702\u002F93f72404-b338-11e6-92d4-9a365550a701.gif)\n\nThis module will help you:\n\n1. Realize what's _really_ inside your bundle\n2. Find out what modules make up the most of its size\n3. Find modules that got there by mistake\n4. Optimize it!\n\nAnd the best thing is it supports minified bundles! It parses them to get real size of bundled modules.\nAnd it also shows their gzipped, Brotli, or Zstandard sizes!\n\n\u003Ch2 align=\"center\">Options (for plugin)\u003C\u002Fh2>\n\n\u003C!-- eslint-skip -->\n\n```js\nnew BundleAnalyzerPlugin(options?: object)\n```\n\n|            Name            |                                                                                          Type                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| :------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n|     **`analyzerMode`**     |                                                                     One of: `server`, `static`, `json`, `disabled`                                                                     | Default: `server`. In `server` mode analyzer will start HTTP server to show bundle report. In `static` mode single HTML file with bundle report will be generated. In `json` mode single JSON file with bundle report will be generated. In `disabled` mode you can use this plugin to just generate Webpack Stats JSON file by setting `generateStatsFile` to `true`.                                                                  |\n|     **`analyzerHost`**     |                                                                                       `{String}`                                                                                       | Default: `127.0.0.1`. Host that will be used in `server` mode to start HTTP server.                                                                                                                                                                                                                                                                                                                                                     |\n|     **`analyzerPort`**     |                                                                                  `{Number}` or `auto`                                                                                  | Default: `8888`. Port that will be used in `server` mode to start HTTP server. If `analyzerPort` is `auto`, the operating system will assign an arbitrary unused port                                                                                                                                                                                                                                                                   |\n|     **`analyzerUrl`**      | `{Function}` called with `{ listenHost: string, listenHost: string, boundAddress: server.address}`. [server.address comes from Node.js](https:\u002F\u002Fnodejs.org\u002Fapi\u002Fnet.html#serveraddress) | Default: `http:\u002F\u002F${listenHost}:${boundAddress.port}`. The URL printed to console with server mode.                                                                                                                                                                                                                                                                                                                                      |\n|    **`reportFilename`**    |                                                                                       `{String}`                                                                                       | Default: `report.html`. Path to bundle report file that will be generated in `static` mode. It can be either an absolute path or a path relative to a bundle output directory (which is output.path in webpack config).                                                                                                                                                                                                                 |\n|     **`reportTitle`**      |                                                                                  `{String\\|function}`                                                                                  | Default: function that returns pretty printed current date and time. Content of the HTML `title` element; or a function of the form `() => string` that provides the content.                                                                                                                                                                                                                                                           |\n|     **`defaultSizes`**     |                                                                       One of: `stat`, `parsed`, `gzip`, `brotli`                                                                       | Default: `parsed`. Module sizes to show in report by default. [Size definitions](#size-definitions) section describes what these values mean.                                                                                                                                                                                                                                                                                           |\n| **`compressionAlgorithm`** |                                                                            One of: `gzip`, `brotli`, `zstd`                                                                            | Default: `gzip`. Compression type used to calculate the compressed module sizes.                                                                                                                                                                                                                                                                                                                                                        |\n|     **`openAnalyzer`**     |                                                                                      `{Boolean}`                                                                                       | Default: `true`. Automatically open report in default browser.                                                                                                                                                                                                                                                                                                                                                                          |\n|  **`generateStatsFile`**   |                                                                                      `{Boolean}`                                                                                       | Default: `false`. If `true`, webpack stats JSON file will be generated in bundle output directory                                                                                                                                                                                                                                                                                                                                       |\n|    **`statsFilename`**     |                                                                                       `{String}`                                                                                       | Default: `stats.json`. Name of webpack stats JSON file that will be generated if `generateStatsFile` is `true`. It can be either an absolute path or a path relative to a bundle output directory (which is output.path in webpack config).                                                                                                                                                                                             |\n|     **`statsOptions`**     |                                                                                  `null` or `{Object}`                                                                                  | Default: `null`. Options for `stats.toJson()` method. For example you can exclude sources of your modules from stats file with `source: false` option. [See more options here](https:\u002F\u002Fwebpack.js.org\u002Fconfiguration\u002Fstats\u002F).                                                                                                                                                                                                            |\n|    **`excludeAssets`**     |                                                  `{null\\|pattern\\|pattern[]}` where `pattern` equals to `{String\\|RegExp\\|function}`                                                   | Default: `null`. Patterns that will be used to match against asset names to exclude them from the report. If pattern is a string it will be converted to RegExp via `new RegExp(str)`. If pattern is a function it should have the following signature `(assetName: string) => boolean` and should return `true` to _exclude_ matching asset. If multiple patterns are provided asset should match at least one of them to be excluded. |\n|       **`logLevel`**       |                                                                       One of: `info`, `warn`, `error`, `silent`                                                                        | Default: `info`. Used to control how much details the plugin outputs.                                                                                                                                                                                                                                                                                                                                                                   |\n\n\u003Ch2 align=\"center\">Usage (as a CLI utility)\u003C\u002Fh2>\n\nYou can analyze an existing bundle if you have a webpack stats JSON file.\n\nYou can generate it using `BundleAnalyzerPlugin` with `generateStatsFile` option set to `true` or with this simple\ncommand:\n\n```bash\nwebpack --profile --json > stats.json\n```\n\nIf you're on Windows and using PowerShell, you can generate the stats file with this command to [avoid BOM issues](https:\u002F\u002Fgithub.com\u002Fwebpack\u002Fwebpack-bundle-analyzer\u002Fissues\u002F47):\n\n```\nwebpack --profile --json | Out-file 'stats.json' -Encoding OEM\n```\n\nThen you can run the CLI tool.\n\n```\nwebpack-bundle-analyzer bundle\u002Foutput\u002Fpath\u002Fstats.json\n```\n\n\u003Ch2 align=\"center\">Options (for CLI)\u003C\u002Fh2>\n\n```bash\nwebpack-bundle-analyzer \u003CbundleStatsFile> [bundleDir] [options]\n```\n\nArguments are documented below:\n\n### `bundleStatsFile`\n\nPath to webpack stats JSON file\n\n### `bundleDir`\n\nDirectory containing all generated bundles.\n\n### `options`\n\n```\n  -V, --version                   output the version number\n  -m, --mode \u003Cmode>               Analyzer mode. Should be `server`, `static` or `json`.\n                                  In `server` mode analyzer will start HTTP server to show bundle report.\n                                  In `static` mode single HTML file with bundle report will be generated.\n                                  In `json` mode single JSON file with bundle report will be generated. (default: server)\n  -h, --host \u003Chost>               Host that will be used in `server` mode to start HTTP server. (default: 127.0.0.1)\n  -p, --port \u003Cn>                  Port that will be used in `server` mode to start HTTP server. Should be a number or `auto` (default: 8888)\n  -r, --report \u003Cfile>             Path to bundle report file that will be generated in `static` mode. (default: report.html)\n  -t, --title \u003Ctitle>             String to use in title element of html report. (default: pretty printed current date)\n  -s, --default-sizes \u003Ctype>      Module sizes to show in treemap by default.\n                                  Possible values: stat, parsed, gzip, brotli, zstd (default: parsed)\n  --compression-algorithm \u003Ctype>  Compression algorithm that will be used to calculate the compressed module sizes.\n                                  Possible values: gzip, brotli, zstd (default: gzip)\n  -O, --no-open                   Don't open report in default browser automatically.\n  -e, --exclude \u003Cregexp>          Assets that should be excluded from the report.\n                                  Can be specified multiple times.\n  -l, --log-level \u003Clevel>         Log level.\n                                  Possible values: debug, info, warn, error, silent (default: info)\n  -h, --help                      output usage information\n```\n\n\u003Ch2 align=\"center\" id=\"size-definitions\">Size definitions\u003C\u002Fh2>\n\nwebpack-bundle-analyzer reports three values for sizes. `defaultSizes` can be used to control which of these is shown by default. The different reported sizes are:\n\n### `stat`\n\nThis is the \"input\" size of your files, before any transformations like\nminification.\n\nIt is called \"stat size\" because it's obtained from Webpack's\n[stats object](https:\u002F\u002Fwebpack.js.org\u002Fconfiguration\u002Fstats\u002F).\n\n### `parsed`\n\nThis is the \"output\" size of your files. If you're using a Webpack plugin such\nas Uglify, then this value will reflect the minified size of your code.\n\n### `gzip`\n\nThis is the size of running the parsed bundles\u002Fmodules through gzip compression.\n\n### `brotli`\n\nThis is the size of running the parsed bundles\u002Fmodules through Brotli compression.\n\n### `zstd`\n\nThis is the size of running the parsed bundles\u002Fmodules through Zstandard compression. (Node.js 22.15.0+ is required for this feature)\n\n\u003Ch2 align=\"center\">Selecting Which Chunks to Display\u003C\u002Fh2>\n\nWhen opened, the report displays all of the Webpack chunks for your project. It's possible to filter to a more specific list of chunks by using the sidebar or the chunk context menu.\n\n### Sidebar\n\nThe Sidebar Menu can be opened by clicking the `>` button at the top left of the report. You can select or deselect chunks to display under the \"Show chunks\" heading there.\n\n### Chunk Context Menu\n\nThe Chunk Context Menu can be opened by right-clicking or `Ctrl`-clicking on a specific chunk in the report. It provides the following options:\n\n- **Hide chunk:** Hides the selected chunk\n- **Hide all other chunks:** Hides all chunks besides the selected one\n- **Show all chunks:** Un-hides any hidden chunks, returning the report to its initial, unfiltered view\n\n\u003Ch2 align=\"center\">Troubleshooting\u003C\u002Fh2>\n\n### I don't see `gzip` or `parsed` sizes, it only shows `stat` size\n\nIt happens when `webpack-bundle-analyzer` analyzes files that don't actually exist in your file system, for example when you work with `webpack-dev-server` that keeps all the files in RAM. If you use `webpack-bundle-analyzer` as a plugin you won't get any errors, however if you run it via CLI you get the error message in terminal:\n\n```\nError parsing bundle asset \"your_bundle_name.bundle.js\": no such file\nNo bundles were parsed. Analyzer will show only original module sizes from stats file.\n```\n\nTo get more information about it you can read [issue #147](https:\u002F\u002Fgithub.com\u002Fwebpack\u002Fwebpack-bundle-analyzer\u002Fissues\u002F147).\n\n\u003Ch2 align=\"center\">Other tools\u003C\u002Fh2>\n\n- [Statoscope](https:\u002F\u002Fgithub.com\u002Fsmelukov\u002Fstatoscope\u002Fblob\u002Fmaster\u002Fpackages\u002Fui-webpack\u002FREADME.md) - Webpack bundle analyzing tool to find out why a certain module was bundled (and more features, including interactive treemap)\n\n\u003Ch2 align=\"center\">Maintainers\u003C\u002Fh2>\n\n\u003Ctable>\n  \u003Ctbody>\n    \u003Ctr>\n      \u003Ctd align=\"center\">\n        \u003Cimg width=\"150\" height=\"150\"\n        src=\"https:\u002F\u002Favatars3.githubusercontent.com\u002Fu\u002F302213?v=4&s=150\">\n        \u003C\u002Fbr>\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fth0r\">Yuriy Grunin\u003C\u002Fa>\n      \u003C\u002Ftd>\n      \u003Ctd align=\"center\">\n        \u003Cimg width=\"150\" height=\"150\"\n        src=\"https:\u002F\u002Favatars3.githubusercontent.com\u002Fu\u002F482561?v=4&s=150\">\n        \u003C\u002Fbr>\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fvalscion\">Vesa Laakso\u003C\u002Fa>\n      \u003C\u002Ftd>\n    \u003C\u002Ftr>\n  \u003Ctbody>\n\u003C\u002Ftable>\n\n[npm]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fwebpack-bundle-analyzer.svg\n[npm-url]: https:\u002F\u002Fnpmjs.com\u002Fpackage\u002Fwebpack-bundle-analyzer\n[node]: https:\u002F\u002Fimg.shields.io\u002Fnode\u002Fv\u002Fwebpack-bundle-analyzer.svg\n[node-url]: https:\u002F\u002Fnodejs.org\n[tests]: https:\u002F\u002Fgithub.com\u002Fwebpack\u002Fwebpack-bundle-analyzer\u002Factions\u002Fworkflows\u002Fmain.yml\u002Fbadge.svg\n[tests-url]: https:\u002F\u002Fgithub.com\u002Fwebpack\u002Fwebpack-bundle-analyzer\u002Factions\u002Fworkflows\u002Fmain.yml\n[downloads]: https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdt\u002Fwebpack-bundle-analyzer.svg\n[downloads-url]: https:\u002F\u002Fnpmjs.com\u002Fpackage\u002Fwebpack-bundle-analyzer\n\n\u003Ch2 align=\"center\">Contributing\u003C\u002Fh2>\n\nCheck out [CONTRIBUTING.md](.\u002FCONTRIBUTING.md) for instructions on contributing :tada:\n","Webpack Bundle Analyzer 是一个用于可视化 Webpack 打包文件大小的插件和命令行工具。它通过生成可交互缩放的树状图来展示打包内容，帮助开发者清晰地了解每个模块及其在最终构建中的体积占比。项目使用 JavaScript 开发，具有强大的分析能力，支持显示压缩后的文件大小（如 gzip、Brotli 或 Zstandard 格式），并能识别出意外引入的大体积模块或冗余代码。该工具非常适合前端开发人员在优化应用性能时使用，尤其是在需要减少加载时间和提高用户体验的场景下。",2,"2026-06-11 02:54:10","top_language"]