fix(docs-infra): fix angular.io on IE 11 (#41162)
Previously, the angular.io app was broken on IE 11. In particular, pages that included Custom Elements would fail to load, because the `Reflect.construct()` method (which the Custom Elements ES5 shim relies on) was not available. This commit fixes this by loading the polyfill for `Reflect.construct()` on browsers that do not support ES2015 (including IE 11). PR Close #41162
This commit is contained in:
parent
d368fa2fa4
commit
79e21b966e
|
@ -49,6 +49,11 @@
|
|||
"glob": "native-shim.js",
|
||||
"input": "node_modules/@webcomponents/custom-elements/src",
|
||||
"output": "/assets/js"
|
||||
},
|
||||
{
|
||||
"glob": "es.reflect.construct.js",
|
||||
"input": "node_modules/core-js/modules",
|
||||
"output": "/assets/js"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
|
@ -156,6 +161,11 @@
|
|||
"glob": "native-shim.js",
|
||||
"input": "node_modules/@webcomponents/custom-elements/src",
|
||||
"output": "/assets/js"
|
||||
},
|
||||
{
|
||||
"glob": "es.reflect.construct.js",
|
||||
"input": "node_modules/core-js/modules",
|
||||
"output": "/assets/js"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"/assets/js/*.js",
|
||||
"/*.css",
|
||||
"/*.js",
|
||||
"!/assets/js/es.reflect.construct.js",
|
||||
"!/assets/js/native-shim.js",
|
||||
"!/*-es5*.js"
|
||||
],
|
||||
|
@ -40,6 +41,7 @@
|
|||
"resources": {
|
||||
"files": [
|
||||
"/assets/images/favicons/**",
|
||||
"/assets/js/es.reflect.construct.js",
|
||||
"/assets/js/native-shim.js",
|
||||
"/*-es5*.js",
|
||||
"!/**/_unused/**"
|
||||
|
|
|
@ -118,6 +118,7 @@
|
|||
- 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>
|
||||
|
|
Loading…
Reference in New Issue