Skip to content

Instantly share code, notes, and snippets.

@alexrohleder
Last active December 27, 2022 19:05
Show Gist options
  • Save alexrohleder/a48b45c4d9e24d20ded0292d23767d9c to your computer and use it in GitHub Desktop.
Save alexrohleder/a48b45c4d9e24d20ded0292d23767d9c to your computer and use it in GitHub Desktop.
Analysing Webpack bundle
{
"scripts": {
// from https://github.com/sparkletown/sparkle
"analyze:bundle-stats": "npx webpack-bundle-analyzer build/bundle-stats.json -m static -r build/bundle-stats.html",
"analyze:bundle-stats:statoscope": "npx @statoscope/cli serve ./build/bundle-stats.json",
"analyze:bundle-stats:duplicates-1": "npx inspectpack --action duplicates --stats build/bundle-stats.json",
"analyze:bundle-stats:duplicates-2": "npx webpack-stats-duplicates ./build/bundle-stats.json",
}
}
{
// Set this property on Webpack's config.
// @see https://webpack.js.org/configuration/stats/
// @see https://github.com/webpack/webpack/issues/9392
"stats": "verbose"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment