dispatch/client/webpack.config.prod.js

37 lines
794 B
JavaScript
Raw Normal View History

2015-12-28 23:34:32 +00:00
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'./src/js/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/'
},
module: {
2017-02-16 02:55:50 +00:00
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' },
{ test: /node_modules/, loader: 'ify-loader' }
2015-12-28 23:34:32 +00:00
]
},
plugins: [
new webpack.DefinePlugin({
2017-02-16 02:55:50 +00:00
DEV: false,
2015-12-28 23:34:32 +00:00
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};