#Angular2 Webpack Polyfill A simple starter example showing Angular2 bundled using webpack with polyfill.io service.
npm install
Run dev server
npm start
Build deployment
npm run build
The polyfill downloaded is based on the browser user agent. The lack of Intl support in Safari is the reason for it being the largest (currently used in number pipe formatting). Using the separate polyfill service prevents other browser users from having to pay the download price for Safari support.
Browser | Size |
---|---|
Chrome | 911 bytes |
Firefox | 0.32 Kb |
Safari | 15.11 Kb |
Edge | 1.12 Kb |
IE 11 | 2.3 Kb |
The src/ie-fix.ts
file is based on this comment
by @justindujardin