Skip to content

Instantly share code, notes, and snippets.

@arbinish
Created July 17, 2016 13:34
Show Gist options
  • Save arbinish/fd997f5091422303d08e44331b1ec0cb to your computer and use it in GitHub Desktop.
Save arbinish/fd997f5091422303d08e44331b1ec0cb to your computer and use it in GitHub Desktop.
webpack = require('webpack');
module.exports = {
entry: './main.js',
output: {
path: './',
filename: 'index.js'
},
devServer: {
inline: true,
port: 9000
},
plugins: [
new webpack.DefinePlugin({
// use minified version of react
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
// update babelrc to include es2015 and react
loader: 'babel',
// query: {
// presets: []
// }
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment