polyfills.ts 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /**
  2. * This file includes polyfills needed by Angular and is loaded before the app.
  3. * You can add your own extra polyfills to this file.
  4. *
  5. * This file is divided into 2 sections:
  6. * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
  7. * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
  8. * file.
  9. *
  10. * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
  11. * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
  12. * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
  13. *
  14. * Learn more in https://angular.io/guide/browser-support
  15. */
  16. /***************************************************************************************************
  17. * BROWSER POLYFILLS
  18. */
  19. import 'core-js/es7/object'
  20. /** IE10 and IE11 requires the following for NgClass support on SVG elements */
  21. // import 'classlist.js'; // Run `npm install --save classlist.js`.
  22. /** IE10 and IE11 requires the following for the Reflect API. */
  23. // For Google Bot
  24. // import 'core-js/es6/reflect'; // --> dealt with in src/environment.ts
  25. /**
  26. * Evergreen browsers require these.
  27. */
  28. // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
  29. // import 'core-js/es7/reflect' // --> dealt with in src/environment.ts
  30. /**
  31. * Required to support Web Animations `@angular/platform-browser/animations`.
  32. * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
  33. */
  34. // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
  35. /**
  36. * By default, zone.js will patch all possible macroTask and DomEvents
  37. * user can disable parts of macroTask/DomEvents patch by setting following flags
  38. */
  39. // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
  40. // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
  41. // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
  42. /*
  43. * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
  44. * with the following flag, it will bypass `zone.js` patch for IE/Edge
  45. */
  46. // (window as any).__Zone_enable_cross_context_check = true;
  47. /***************************************************************************************************
  48. * Zone JS is required by default for Angular itself.
  49. */
  50. // tslint:disable
  51. import 'zone.js/dist/zone' // Included with Angular CLI.
  52. /***************************************************************************************************
  53. * APPLICATION IMPORTS
  54. */
  55. // global/process polyfills
  56. ;(window as any).global = window
  57. ;(window as any).process = require('process/')
  58. ;(window as any).Buffer = require('buffer/').Buffer