You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
quaggaJS/example/sandbox/webpack.config.min.js

45 lines
1002 B
JavaScript

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",
}],
},
};