Skip to content

Commit 9580f05

Browse files
committed
apply ng2webpack starter. mangle only RouterLink
1 parent bbe9fee commit 9580f05

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"clean-start": "npm run clean && npm start",
1010
"watch": "webpack --watch --progress --profile --colors --display-error-details --display-cached",
1111
"build": "webpack --progress --profile --colors --display-error-details --display-cached",
12-
"build:prod": "webpack --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached",
12+
"build:prod": "webpack --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached --bail",
1313
"server": "webpack-dev-server --hot --inline --progress --profile --colors --watch --display-error-details --display-cached --content-base src/",
1414
"test": "karma start",
1515
"docs": "typedoc --options typedoc.json src/**/*.ts",

webpack.prod.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ module.exports = helpers.defaults({
8484
new DedupePlugin(),
8585
new UglifyJsPlugin({
8686
beautify: false,
87-
mangle: false,
87+
mangle: {
88+
screw_ie8 : true,
89+
except: ['RouterLink'] // needed for uglify RouterLink problem
90+
},
8891
compress: {screw_ie8: true},
8992
comments: false
9093
}),

0 commit comments

Comments
 (0)