Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Commit

Permalink
Set minimize=true to loader options when --uglify passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
hdeshev committed Jan 19, 2017
1 parent 47142bc commit f7455c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webpack.common.js.angular.template
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ module.exports = function (platform, destinationApp) {
];

if (process.env.npm_config_uglify) {
plugins.push(new webpack.LoaderOptionsPlugin({
minimize: true
}));

//Work around an Android issue by setting compress = false
var compress = platform !== "android";
plugins.push(new webpack.optimize.UglifyJsPlugin({
Expand Down
4 changes: 4 additions & 0 deletions webpack.common.js.nativescript.template
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ module.exports = function (platform, destinationApp) {
];

if (process.env.npm_config_uglify) {
plugins.push(new webpack.LoaderOptionsPlugin({
minimize: true
}));

//Work around an Android issue by setting compress = false
var compress = platform !== "android";
plugins.push(new webpack.optimize.UglifyJsPlugin({
Expand Down

0 comments on commit f7455c9

Please sign in to comment.