Sandbox: added production-config for webpack
parent
e42fc6d221
commit
031995dae1
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,44 @@
|
|||||||
|
var webpack = require('webpack'),
|
||||||
|
path = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: ['./src/index.js'],
|
||||||
|
output: {
|
||||||
|
path: __dirname + '/static',
|
||||||
|
publicPath: '/',
|
||||||
|
filename: 'bundle.min.js'
|
||||||
|
},
|
||||||
|
resolve: {
|
||||||
|
modules: [
|
||||||
|
'node_modules'
|
||||||
|
],
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': {NODE_ENV: '"production"'}
|
||||||
|
}),
|
||||||
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
minimize: true,
|
||||||
|
debug: false
|
||||||
|
}),
|
||||||
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
|
compress: {
|
||||||
|
warnings: false
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
comments: /@preserve/
|
||||||
|
},
|
||||||
|
sourceMap: false
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
module: {
|
||||||
|
loaders: [{
|
||||||
|
test: /\.jsx?$/,
|
||||||
|
exclude: /(node_modules|quagga\.js)/,
|
||||||
|
loader: 'babel-loader',
|
||||||
|
}, {
|
||||||
|
test: /\.json$/,
|
||||||
|
loader: "json-loader",
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
};
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue