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