Skip to content

Commit 98c1bd6

Browse files
alan-agius4Keen Yee Liau
authored and
Keen Yee Liau
committed
test: change polyfills in hello-world-app which causes rebuilds TS worker to fail
1 parent 56d9adc commit 98c1bd6

File tree

2 files changed

+27
-31
lines changed

2 files changed

+27
-31
lines changed

tests/angular_devkit/build_angular/hello-world-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"@angular/platform-browser": "^6.0.0-rc.0",
2424
"@angular/platform-browser-dynamic": "^6.0.0-rc.0",
2525
"@angular/router": "^6.0.0-rc.0",
26-
"core-js": "^2.4.1",
2726
"rxjs": "~6.2.0",
2827
"zone.js": "^0.8.19"
2928
},

tests/angular_devkit/build_angular/hello-world-app/src/polyfills.ts

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,46 @@
2525
* BROWSER POLYFILLS
2626
*/
2727

28-
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
29-
// import 'core-js/es6/symbol';
30-
// import 'core-js/es6/object';
31-
// import 'core-js/es6/function';
32-
// import 'core-js/es6/parse-int';
33-
// import 'core-js/es6/parse-float';
34-
// import 'core-js/es6/number';
35-
// import 'core-js/es6/math';
36-
// import 'core-js/es6/string';
37-
// import 'core-js/es6/date';
38-
// import 'core-js/es6/array';
39-
// import 'core-js/es6/regexp';
40-
// import 'core-js/es6/map';
41-
// import 'core-js/es6/weak-map';
42-
// import 'core-js/es6/set';
43-
4428
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
4529
// import 'classlist.js'; // Run `npm install --save classlist.js`.
4630

47-
/** IE10 and IE11 requires the following for the Reflect API. */
48-
// import 'core-js/es6/reflect';
49-
50-
51-
/** Evergreen browsers require these. **/
52-
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
53-
import 'core-js/es7/reflect';
54-
55-
5631
/**
57-
* Required to support Web Animations `@angular/platform-browser/animations`.
58-
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
59-
**/
32+
* Web Animations `@angular/platform-browser/animations`
33+
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
34+
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
35+
*/
6036
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
6137

62-
38+
/**
39+
* By default, zone.js will patch all possible macroTask and DomEvents
40+
* user can disable parts of macroTask/DomEvents patch by setting following flags
41+
* because those flags need to be set before `zone.js` being loaded, and webpack
42+
* will put import in the top of bundle, so user need to create a separate file
43+
* in this directory (for example: zone-flags.ts), and put the following flags
44+
* into that file, and then add the following code before importing zone.js.
45+
* import './zone-flags.ts';
46+
*
47+
* The flags allowed in zone-flags.ts are listed here.
48+
*
49+
* The following flags will work for all browsers.
50+
*
51+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
52+
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
53+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
54+
*
55+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
56+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
57+
*
58+
* (window as any).__Zone_enable_cross_context_check = true;
59+
*
60+
*/
6361

6462
/***************************************************************************************************
6563
* Zone JS is required by default for Angular itself.
6664
*/
6765
import 'zone.js/dist/zone'; // Included with Angular CLI.
6866

6967

70-
7168
/***************************************************************************************************
7269
* APPLICATION IMPORTS
7370
*/

0 commit comments

Comments
 (0)