diff --git a/lib/resources/content/webpack.config.template.js b/lib/resources/content/webpack.config.template.js index c213c6f1d..1ef3f9e0a 100644 --- a/lib/resources/content/webpack.config.template.js +++ b/lib/resources/content/webpack.config.template.js @@ -4,7 +4,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const project = require('./aurelia_project/aurelia.json'); const { AureliaPlugin, ModuleDependenciesPlugin } = require('aurelia-webpack-plugin'); -const { optimize: { CommonsChunkPlugin }, ProvidePlugin } = require('webpack'); +const { optimize: { CommonsChunkPlugin, UglifyJsPlugin }, ProvidePlugin } = require('webpack'); // @if transpiler.id='typescript' const { TsConfigPathsPlugin, CheckerPlugin } = require('awesome-typescript-loader'); // @endif @@ -188,6 +188,9 @@ module.exports = ({production, server, extractCss, coverage} = {}) => ({ })), ...when(production, new CopyWebpackPlugin([ { from: 'static/favicon.ico', to: 'favicon.ico' } - ])) + ])), + ...when(production, new UglifyJsPlugin({ + sourceMap: true + })) ] });