diff --git a/webpack.config.js b/webpack.config.js index 2410bf7df..0c7bc6997 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -34,7 +34,7 @@ module.exports = { include: [ path.join(__dirname, 'app'), path.join(__dirname, 'shared'), - ], + ] }, { test: /\.json$/, loader: 'json-loader' }, // inline base64 URLs for <=8k images, direct URLs for the rest diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 9365753e2..0723ba771 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -3,6 +3,7 @@ var path = require('path'); var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); +var UglifyJsPlugin = require('uglifyjs-webpack-plugin'); var ManifestPlugin = require('webpack-manifest-plugin'); commonWebpackConfig = require('./webpack.config'); @@ -25,8 +26,11 @@ productionWebpackConfig.plugins = [ template: 'server/static/index.html', }), new ExtractTextPlugin({ filename: 'styles.[hash].css' }), - new webpack.optimize.UglifyJsPlugin({ + new UglifyJsPlugin({ sourceMap: true, + uglifyOptions: { + compress: true + } }), new webpack.DefinePlugin({ 'process.env': {