build(aio): turn on webpack 3.0 scope-hoisting
This commit is contained in:
parent
7e22a2fc0b
commit
ff15509bc7
@ -7,5 +7,6 @@ if (!fs.existsSync(PATCH_LOCK)) {
|
|||||||
sh.touch(PATCH_LOCK);
|
sh.touch(PATCH_LOCK);
|
||||||
sh.exec(`patch -p0 -i tools/cli-patches/ngo-loader.patch &&
|
sh.exec(`patch -p0 -i tools/cli-patches/ngo-loader.patch &&
|
||||||
patch -p0 -i node_modules/purify/angular-cli.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`);
|
patch -p0 -i tools/cli-patches/uglify-config.patch`);
|
||||||
}
|
}
|
||||||
|
10
aio/tools/cli-patches/scope-hoisting.patch
Normal file
10
aio/tools/cli-patches/scope-hoisting.patch
Normal 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,
|
@ -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:36:43.000000000 -0700
|
||||||
+++ node_modules/@angular/cli/models/webpack-configs/production.js 2017-05-24 15:37:04.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 (require("purify/purify-webpack-plugin"))(),
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
mangle: { screw_ie8: true },
|
mangle: { screw_ie8: true },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user