From 863aff1a779edd35a14abb44fd3936768886e7ad Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Wed, 28 Feb 2018 15:06:18 -0800 Subject: [PATCH] feat(elements): add polyfill for elements es5 shim (#22413) PR Close #22413 --- aio/scripts/_payload-limits.json | 2 +- aio/src/polyfills.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aio/scripts/_payload-limits.json b/aio/scripts/_payload-limits.json index 040a8e5232..38ff6ba3fe 100755 --- a/aio/scripts/_payload-limits.json +++ b/aio/scripts/_payload-limits.json @@ -4,7 +4,7 @@ "uncompressed": { "inline": 2062, "main": 467103, - "polyfills": 54253, + "polyfills": 55349, "embedded": 71711, "prettify": 14888 } diff --git a/aio/src/polyfills.ts b/aio/src/polyfills.ts index 1487c63c87..3cfa5675f0 100644 --- a/aio/src/polyfills.ts +++ b/aio/src/polyfills.ts @@ -30,9 +30,12 @@ /** HACK: force import of environment.ts/environment.prod.ts to load env specific polyfills */ import './environments/environment'; -/** window.customElements */ +/** Add support for window.customElements */ import '@webcomponents/custom-elements/custom-elements.min'; +/** Required for custom elements for apps building to es5. */ +import '@webcomponents/custom-elements/src/native-shim'; + /** ALL Firefox browsers require the following to support `@angular/animation`. **/ // import 'web-animations-js'; // Run `npm install --save web-animations-js`.