mirror of
https://github.com/portainer/portainer.git
synced 2025-08-03 04:45:21 +02:00
chore(build): add script to analyze webpack bundle [EE-2132] (#6259)
* chore(build): add script to analyze webpack bundle * chore(build): use single dep (lodash,moment)
This commit is contained in:
parent
5a3687a564
commit
d9db789511
5 changed files with 88 additions and 13 deletions
12
webpack/webpack.analyze.js
Normal file
12
webpack/webpack.analyze.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
const smp = new SpeedMeasurePlugin();
|
||||
const merge = require('webpack-merge');
|
||||
const webpackConfig = require('./webpack.production.js');
|
||||
// const webpackConfig = require('./webpack.develop.js');
|
||||
|
||||
module.exports = smp.wrap(
|
||||
merge(webpackConfig, {
|
||||
plugins: [new BundleAnalyzerPlugin()],
|
||||
})
|
||||
);
|
|
@ -159,6 +159,7 @@ module.exports = {
|
|||
Kubernetes: path.resolve(projectRoot, 'app/kubernetes'),
|
||||
Portainer: path.resolve(projectRoot, 'app/portainer'),
|
||||
'@': path.resolve(projectRoot, 'app'),
|
||||
'lodash-es': 'lodash',
|
||||
},
|
||||
extensions: ['.js', '.ts', '.tsx'],
|
||||
plugins: [
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
|
||||
const smp = new SpeedMeasurePlugin();
|
||||
|
||||
const devConfig = require('./webpack.develop.js');
|
||||
// const prodConfig = require('./webpack.production.js');
|
||||
|
||||
module.exports = smp.wrap(devConfig);
|
Loading…
Add table
Add a link
Reference in a new issue