blob: 3c490bad26d0657358a5961ef0969efc92b61703 [file] [log] [blame]
Monty Taylor4a781a72017-07-25 07:28:04 -04001const path = require('path');
2const webpack = require('webpack');
3const Merge = require('webpack-merge');
4const CommonConfig = require('./webpack.common.js');
5const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
6
7module.exports = Merge(CommonConfig, {
8
9 module: {
10 rules: [
11 {
12 enforce: 'pre',
13 test: /\.js$/,
14 use: [
15 'babel-loader',
16 'eslint-loader'
17 ],
18 exclude: /node_modules/,
19 }
20 ]
21 },
22 plugins: [
23 new webpack.HotModuleReplacementPlugin(),
24 new BundleAnalyzerPlugin({
25 analyzerMode: 'static',
26 reportFilename: '../../../reports/bundle.html',
27 generateStatsFile: true,
28 openAnalyzer: false,
29 statsFilename: '../../../reports/stats.json',
30 }),
31 ]
32})