Skip to content

Commit

Permalink
Added Webpack configuration for production build.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratbn committed Jan 18, 2017
1 parent b0f0210 commit ff37dff
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -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.