draggable/examples/tools/webpack.plugins.js
2018-03-04 19:58:01 -05:00

20 lines
408 B
JavaScript

import * as bundleAnalyzer from 'webpack-bundle-analyzer';
export default function initPlugins(isProd = false) {
const plugins = [];
if (isProd) {
console.log('Running in `production`');
}
plugins.push(
new bundleAnalyzer.BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: false,
reportFilename: '../../../bundle-report.html',
}),
);
return plugins;
}