Skip to content

Commit

Permalink
fix(webpack): uglify by default for production builds
Browse files Browse the repository at this point in the history
closes #739
  • Loading branch information
JeroenVinke committed Sep 3, 2017
1 parent 238b863 commit 0732294
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/resources/content/webpack.config.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.