Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions aio/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"src/pwa-manifest.json",
"src/google385281288605d160.html",
{
"glob": "custom-elements.min.js",
"input": "node_modules/@webcomponents/custom-elements",
"glob": "native-shim.js",
"input": "node_modules/@webcomponents/custom-elements/src",
"output": "/assets/js"
},
{
"glob": "native-shim.js",
"input": "node_modules/@webcomponents/custom-elements/src",
"glob": "es.reflect.construct.js",
"input": "node_modules/core-js/modules",
"output": "/assets/js"
}
],
Expand Down Expand Up @@ -158,13 +158,13 @@
"src/pwa-manifest.json",
"src/google385281288605d160.html",
{
"glob": "custom-elements.min.js",
"input": "node_modules/@webcomponents/custom-elements",
"glob": "native-shim.js",
"input": "node_modules/@webcomponents/custom-elements/src",
"output": "/assets/js"
},
{
"glob": "native-shim.js",
"input": "node_modules/@webcomponents/custom-elements/src",
"glob": "es.reflect.construct.js",
"input": "node_modules/core-js/modules",
"output": "/assets/js"
}
],
Expand Down
4 changes: 4 additions & 0 deletions aio/ngsw-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"/assets/js/*.js",
"/*.css",
"/*.js",
"!/assets/js/es.reflect.construct.js",
"!/assets/js/native-shim.js",
"!/*-es5*.js"
],
"urls": [
Expand All @@ -39,6 +41,8 @@
"resources": {
"files": [
"/assets/images/favicons/**",
"/assets/js/es.reflect.construct.js",
"/assets/js/native-shim.js",
"/*-es5*.js",
"!/**/_unused/**"
]
Expand Down
13 changes: 13 additions & 0 deletions aio/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ <h2 style="color: red; margin-top: 40px; position: relative; text-align: center;
<b><i>This website requires JavaScript.</i></b>
</h2>
</noscript>

<!--
Custom Element ES5 shim. Required for browsers that natively support Custom Elements, but do not
support ES2015 modules.
NOTE: Chrome, Firefox and Safari should not need this, because they added support for ES2015
modules before Custom Elements. It is still required for some other (less common) browsers:
- UC browser for android 11.8 (~3.5% global usage)
- Samsung browser 5.0-8.1 (~0.43% global usage)
- Opera 41-47 (~0.02% global usage)
-->
<script src="assets/js/es.reflect.construct.js" nomodule></script>;
<script src="assets/js/native-shim.js" nomodule></script>;

</body>

</html>
8 changes: 0 additions & 8 deletions aio/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,3 @@ import 'zone.js'; // Included with Angular CLI.
*/
// Custom Elements polyfill. Required for browsers that do not natively support Custom Elements.
import '@webcomponents/custom-elements';
// Custom Element ES5 shim. Required for browsers that natively support Custom Elements, but do not
// support ES2015 modules.
// NOTE: Chrome, Firefox and Safari should not need this, because they added support for ES2015
// modules before Custom Elements. It is still required for some other (less common) browsers:
// - UC browser for android 11.8 (~3.5% global usage)
// - Samsung browser 5.0-8.1 (~0.43% global usage)
// - Opera 41-47 (~0.02% global usage)
import '@webcomponents/custom-elements/src/native-shim';
6 changes: 3 additions & 3 deletions goldens/size-tracking/aio-payloads.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"uncompressed": {
"runtime-es2015": 3033,
"main-es2015": 450953,
"polyfills-es2015": 52343
"polyfills-es2015": 52215
}
}
},
Expand All @@ -13,7 +13,7 @@
"uncompressed": {
"runtime-es2015": 3033,
"main-es2015": 451402,
"polyfills-es2015": 52493
"polyfills-es2015": 52215
}
}
},
Expand All @@ -22,7 +22,7 @@
"uncompressed": {
"runtime-es2015": 3153,
"main-es2015": 437005,
"polyfills-es2015": 52493
"polyfills-es2015": 52215
}
}
}
Expand Down