From 333786591311fe5f32109376f155e313550b4e67 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 24 Oct 2017 09:50:27 +0100 Subject: [PATCH] build(aio): remove cli patches (#19702) PR Close #19702 --- aio/package.json | 2 +- aio/tools/cli-patches/patch.js | 10 ---------- aio/tools/cli-patches/webpack-no-global.patch | 16 ---------------- 3 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 aio/tools/cli-patches/patch.js delete mode 100644 aio/tools/cli-patches/webpack-no-global.patch diff --git a/aio/package.json b/aio/package.json index 60072f1015..45a79abf20 100644 --- a/aio/package.json +++ b/aio/package.json @@ -52,7 +52,7 @@ "generate-zips": "node ./tools/example-zipper/generateZips", "sw-manifest": "ngu-sw-manifest --dist dist --in ngsw-manifest.json --out dist/ngsw-manifest.json", "sw-copy": "cp node_modules/@angular/service-worker/bundles/worker-basic.min.js dist/", - "postinstall": "node tools/cli-patches/patch.js && uglifyjs node_modules/lunr/lunr.js -c -m -o src/assets/js/lunr.min.js --source-map", + "postinstall": "uglifyjs node_modules/lunr/lunr.js -c -m -o src/assets/js/lunr.min.js --source-map", "build-ie-polyfills": "node node_modules/webpack/bin/webpack.js -p src/ie-polyfills.js src/generated/ie-polyfills.min.js", "~~check-env": "node scripts/check-environment", "~~build": "ng build --target=production --environment=stable -sm --build-optimizer", diff --git a/aio/tools/cli-patches/patch.js b/aio/tools/cli-patches/patch.js deleted file mode 100644 index 259d688d9e..0000000000 --- a/aio/tools/cli-patches/patch.js +++ /dev/null @@ -1,10 +0,0 @@ -const fs = require('fs'); -const sh = require('shelljs'); - -const PATCH_LOCK = 'node_modules/@angular/cli/models/webpack-configs/.patched'; - -if (!fs.existsSync(PATCH_LOCK)) { - sh.exec('patch -p0 -i tools/cli-patches/webpack-no-global.patch'); - sh.touch(PATCH_LOCK); -} - diff --git a/aio/tools/cli-patches/webpack-no-global.patch b/aio/tools/cli-patches/webpack-no-global.patch deleted file mode 100644 index 335d86d70c..0000000000 --- a/aio/tools/cli-patches/webpack-no-global.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- node_modules/@angular/cli/models/webpack-configs/browser.js 2017-10-20 22:11:38.000000000 -0700 -+++ node_modules/@angular/cli/models/webpack-configs/browser.js 2017-10-20 22:11:47.000000000 -0700 -@@ -105,11 +105,11 @@ - fs: 'empty', - // `global` should be kept true, removing it resulted in a - // massive size increase with Build Optimizer on AIO. -- global: true, -+ global: false, - crypto: 'empty', - tls: 'empty', - net: 'empty', -- process: true, -+ process: false, - module: false, - clearImmediate: false, - setImmediate: false