Skip to content

Instantly share code, notes, and snippets.

@AprilArcus
Last active August 29, 2015 14:16
Show Gist options
  • Save AprilArcus/4f455a9ab10f9172caec to your computer and use it in GitHub Desktop.
Save AprilArcus/4f455a9ab10f9172caec to your computer and use it in GitHub Desktop.
var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'./scripts/index'
],
output: {
path: __dirname + '/scripts/',
filename: 'bundle.js',
publicPath: '/scripts/'
},
plugins: [
new webpack.optimize.UglifyJsPlugin(),
new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production') } })
],
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{ test: /\.(js|jsx)?$/, loaders: ['babel-loader?experimental&optional=runtime'], exclude: /node_modules/ }
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment