blob: 3c490bad26d0657358a5961ef0969efc92b61703 [file] [log] [blame]
const path = require('path');
const webpack = require('webpack');
const Merge = require('webpack-merge');
const CommonConfig = require('./webpack.common.js');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = Merge(CommonConfig, {
module: {
rules: [
{
enforce: 'pre',
test: /\.js$/,
use: [
'babel-loader',
'eslint-loader'
],
exclude: /node_modules/,
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new BundleAnalyzerPlugin({
analyzerMode: 'static',
reportFilename: '../../../reports/bundle.html',
generateStatsFile: true,
openAnalyzer: false,
statsFilename: '../../../reports/stats.json',
}),
]
})