![]() Path to webpack stats JSON file bundleDirĭirectory containing all generated bundles. ![]() Options (for CLI) webpack-bundle-analyzer Īrguments are documented below: bundleStatsFile webpack-bundle-analyzer bundle /output/path/stats.json If you're on Windows and using PowerShell, you can generate the stats file with this command to avoid BOM issues: webpack -profile -json | Out- file 'stats.json' -Encoding OEM You can generate it using BundleAnalyzerPlugin with generateStatsFile option set to true or with this simpleĬommand: webpack - profile - json > stats. You can analyze an existing bundle if you have a webpack stats JSON file. Used to control how much details the plugin outputs. If multiple patterns are provided asset should match at least one of them to be excluded.ĭefault: info. If pattern is a function it should have the following signature (assetName: string) => boolean and should return true to exclude matching asset. If pattern is a string it will be converted to RegExp via new RegExp(str). Patterns that will be used to match against asset names to exclude them from the report. ![]() Usage (as a plugin) const BundleAnalyzerPlugin = require( 'webpack-bundle-analyzer').BundleAnalyzerPlugin module.exports = ĭefault: null. Npm install -save-dev webpack- bundle-analyzer Visualize size of webpack output files with an interactive zoomable treemap.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |