From 40baa92b6ab768fabbef39c301f31859c87910de Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Fri, 31 Aug 2018 21:18:23 +0200 Subject: [PATCH] Fix build-prod script --- package.json | 2 +- src/polyfills.ts | 28 ++++++++++++---------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 91687b4..ef46522 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "ng": "ng", "start": "ng serve", "build": "ng build --delete-output-path", - "build-prod": "ng build -prod -e prod --aot --delete-output-path --build-optimizer", + "build-prod": "ng build --prod --optimization --aot --delete-output-path --build-optimizer", "test": "ng test --single-run", "test-continuous": "ng test", "lint": "ng lint", diff --git a/src/polyfills.ts b/src/polyfills.ts index d310405..a83c61e 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -38,12 +38,14 @@ // import 'classlist.js'; // Run `npm install --save classlist.js`. /** IE10 and IE11 requires the following for the Reflect API. */ -// import 'core-js/es6/reflect'; - - +import 'core-js/es6/reflect'; /** Evergreen browsers require these. **/ // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. import 'core-js/es7/reflect'; +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. /** @@ -58,22 +60,16 @@ import 'core-js/es7/reflect'; * user can disable parts of macroTask/DomEvents patch by setting following flags */ - // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames +// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame +// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick +// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - /* - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - */ +/* +* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js +* with the following flag, it will bypass `zone.js` patch for IE/Edge +*/ // (window as any).__Zone_enable_cross_context_check = true; -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - /*************************************************************************************************** * APPLICATION IMPORTS