mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 20:44:49 -04:00
Add webpack-bundle-analyzer as dev-tool (#591)
* Add webpack-bundle-analyzer as dev-tool * Add README information about bundle analysis
This commit is contained in:
parent
985abe230e
commit
23972ffb16
4 changed files with 89 additions and 6 deletions
|
@ -1,4 +1,6 @@
|
|||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const { when } = require('@craco/craco');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
|
||||
module.exports = {
|
||||
webpack: {
|
||||
|
@ -9,6 +11,12 @@ module.exports = {
|
|||
{ from: 'node_modules/@hpcc-js/wasm/dist/expatlib.wasm', to: 'static/js' }
|
||||
],
|
||||
}),
|
||||
...when(Boolean(process.env.ANALYZE), () => [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: "static",
|
||||
generateStatsFile: true
|
||||
})
|
||||
], [])
|
||||
],
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue