Permalink
Browse files

fix(webpack): uglify by default for production builds

closes #739
  • Loading branch information...
JeroenVinke committed Sep 3, 2017
1 parent 238b863 commit 0732294c0bce668876f052a05ecfadce3a479021
Showing with 5 additions and 2 deletions.
  1. +5 −2 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
}))
]
});

0 comments on commit 0732294

Please sign in to comment.