build(aio): turn on webpack 3.0 scope-hoisting

This commit is contained in:
Igor Minar 2017-06-07 23:47:35 -07:00 committed by Igor Minar
parent 7e22a2fc0b
commit ff15509bc7
3 changed files with 12 additions and 1 deletions

View File

@ -7,5 +7,6 @@ if (!fs.existsSync(PATCH_LOCK)) {
sh.touch(PATCH_LOCK);
sh.exec(`patch -p0 -i tools/cli-patches/ngo-loader.patch &&
patch -p0 -i node_modules/purify/angular-cli.patch &&
patch -p0 -i tools/cli-patches/scope-hoisting.patch &&
patch -p0 -i tools/cli-patches/uglify-config.patch`);
}

View File

@ -0,0 +1,10 @@
--- node_modules/@angular/cli/models/webpack-configs/production.js 2017-05-24 15:36:43.000000000 -0700
+++ node_modules/@angular/cli/models/webpack-configs/production.js 2017-05-24 15:37:04.000000000 -0700
@@ -85,6 +85,7 @@
'NODE_ENV': 'production'
}),
new webpack.HashedModuleIdsPlugin(),
+ new webpack.optimize.ModuleConcatenationPlugin(),
new (require("purify/purify-webpack-plugin"))(),
new webpack.optimize.UglifyJsPlugin({
mangle: true,

View File

@ -1,6 +1,6 @@
--- node_modules/@angular/cli/models/webpack-configs/production.js 2017-05-24 15:36:43.000000000 -0700
+++ node_modules/@angular/cli/models/webpack-configs/production.js 2017-05-24 15:37:04.000000000 -0700
@@ -81,7 +81,7 @@
@@ -82,7 +82,7 @@
new (require("purify/purify-webpack-plugin"))(),
new webpack.optimize.UglifyJsPlugin({
mangle: { screw_ie8: true },