2021-02-06 17:12:09 +03:00
|
|
|
const { merge } = require('webpack-merge')
|
2022-03-07 13:29:45 +03:00
|
|
|
const base = require('./webpack.config.js')
|
2020-11-20 11:33:57 +03:00
|
|
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
2020-05-10 12:12:25 +03:00
|
|
|
|
2022-03-07 13:29:45 +03:00
|
|
|
module.exports = (env) => merge(base(env), {
|
2022-10-19 11:45:58 +03:00
|
|
|
plugins: env.BUNDLE_ANALYZER ? [
|
2020-12-21 18:37:10 +03:00
|
|
|
new BundleAnalyzerPlugin(
|
|
|
|
{
|
2022-10-20 19:37:06 +03:00
|
|
|
openAnalyzer: true,
|
2020-12-21 18:37:10 +03:00
|
|
|
}
|
|
|
|
)
|
2022-10-19 11:45:58 +03:00
|
|
|
] : [],
|
2020-05-10 12:12:25 +03:00
|
|
|
})
|