Вот как можно добавить больше плагинов.
В вашей функции webpack(config) { /* ... */ }
вы можете продолжать добавлять больше плагинов в config.plugins
.
Например, здесь я добавил WebpackBar
плагин, который профилирует ваш скрипт сборки.
webpack(config) {
if (process.env.ANALYZE) {
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: 8888,
openAnalyzer: true,
}))
}
config.plugins.push(new WebpackBar({
fancy: true,
profile: true,
basic: false,
}));
// just do as many config.plugins.push() calls as you need
return config
},