dispatch/client/webpack.config.prod.js
2017-04-12 03:44:28 +02:00

35 lines
719 B
JavaScript

var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'./src/js/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{ test: /\.js$/, loader: 'eslint-loader', exclude: /node_modules/, enforce: 'pre' },
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.css$/, loader: 'style-loader!css-loader' }
]
},
plugins: [
new webpack.DefinePlugin({
DEV: false,
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};