Permalink
Browse files

Added Webpack configuration for production build.

  • Loading branch information...
maratbn committed Jan 18, 2017
1 parent b0f0210 commit ff37dff57479e3de5644abf82266ef640e8d53dd
Showing with 11 additions and 2 deletions.
  1. +11 −2 webpack.config.js
@@ -3,7 +3,8 @@
// http://maratbn.com/blogs/2017/01/14/minimalistic-react-webapp/
const path = require('path');
const path = require('path'),
webpack = require('webpack');
module.exports = {
entry: [path.join(__dirname, 'webpack_in', 'entry.js'),
@@ -20,5 +21,13 @@ module.exports = {
output: {
path: path.join(__dirname, 'webpack_out'),
filename: 'minimalistic_react.js'
}
},
plugins: [
new webpack.optimize.UglifyJsPlugin,
new webpack.optimize.DedupePlugin,
new webpack.DefinePlugin({'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
]
};

0 comments on commit ff37dff

Please sign in to comment.