mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Added webpack asset size analyzer.
This commit is contained in:
parent
37acc82b2f
commit
a846f373c0
4 changed files with 93 additions and 10 deletions
|
@ -24,6 +24,7 @@ const CopyPlugin = require('copy-webpack-plugin');
|
|||
|
||||
const zlib = require('zlib');
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
||||
|
||||
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
||||
// It's useful when you use tools that rely on webpack.config.js file.
|
||||
|
@ -135,4 +136,9 @@ if (Encore.isProduction()) {
|
|||
}))
|
||||
}
|
||||
|
||||
if (Encore.isDev()) {
|
||||
Encore.addPlugin(new BundleAnalyzerPlugin());
|
||||
}
|
||||
|
||||
|
||||
module.exports = Encore.getWebpackConfig();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue