Skip to content

Instantly share code, notes, and snippets.

@jakwuh
Created July 6, 2017 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakwuh/754dbd9a66cbcea497dfc4c98ae4963d to your computer and use it in GitHub Desktop.
Save jakwuh/754dbd9a66cbcea497dfc4c98ae4963d to your computer and use it in GitHub Desktop.
Webpack+React production config
let {resolve} = require('path');
let webpack = require('webpack');
module.exports = {
entry: resolve('index.js'),
output: {
path: resolve('dist'),
filename: 'bundle.js'
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment