summaryrefslogtreecommitdiff
path: root/webpack.config.js
blob: 6f4aa706a889c480ee59c97729d38eed5d27a633 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
var webpack = require('webpack');

module.exports = {
  entry: './client/index.jsx',
  watch: true,
	devtool: 'cheap-source-map',
  output: {
    filename: './public/bundle.js'
  },
  module: {
    rules: [
      {
        test: /\.jsx?$/,
        exclude: /(node_modules|bower_components)/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['env','react']
          }
        }
      }
    ]
  },
//   plugins: [
//     new webpack.DefinePlugin({ // <-- key to reducing React's size
//       'process.env': {
//         'NODE_ENV': JSON.stringify('production')
//       }
//     }),
//     new webpack.optimize.UglifyJsPlugin(), // minify everything
//     new webpack.optimize.AggressiveMergingPlugin() // merge chunks 
//   ],
}