1
0
Fork 0
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:
Chaim Lev-Ari 2021-12-21 14:32:48 +02:00 committed by GitHub
parent 5a3687a564
commit d9db789511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 13 deletions

View 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()],
})
);

View file

@ -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: [

View file

@ -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);