Permalink
Browse files

Added Webpack configuration for production build.

  • Loading branch information...
maratbn committed Jun 24, 2018
1 parent 1a76c3c commit 9f63bc92d661449b373fb836af0d14c47f3f7989
Showing with 10 additions and 2 deletions.
  1. +10 −2 webpack.config.js
@@ -3,7 +3,8 @@
// http://maratbn.com/blogs/2018/06/17/minimalistic-react-webapp-webpack-3/
const path = require('path');
const path = require('path'),
webpack = require('webpack');
module.exports = {
entry: [path.join(__dirname, 'webpack_in', 'entry.js'),
@@ -20,5 +21,12 @@ module.exports = {
output: {
path: path.join(__dirname, 'webpack_out'),
filename: 'minimalistic_react.js'
}
},
plugins: [
new webpack.optimize.UglifyJsPlugin,
new webpack.DefinePlugin({'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
]
};

0 comments on commit 9f63bc9

Please sign in to comment.