【发布时间】:2020-02-11 13:29:35
【问题描述】:
在我的 Angular8 项目中,我需要支持 CustomElements 和 ShadowDom。 在脚本部分的 angular.json 文件中,加载了包:
"scripts": [
"node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js"
],
在 Edge 中,一切正常,但 Internet Explorer 抛出“ERROR Error: Uncaught (in promise): Error: Not enough stack space.”。 根据this issue,有些人有类似的错误,因为 polyfills 与 webcomponentsjs 包冲突。
我也删除了提到的 polyfill,但错误仍然存在。
这是我的 polyfill 的完整列表:
import 'core-js/es/symbol';
import 'core-js/es/function';
import 'core-js/es/parse-int';
import 'core-js/es/parse-float';
import 'core-js/es/number';
import 'core-js/es/math';
import 'core-js/es/object';
import 'core-js/es/array';
import 'core-js/es/date';
import 'core-js/es/regexp';
import 'classlist.js';
import 'core-js/es/reflect';
import 'zone.js/dist/zone';
import 'regenerator-runtime/runtime.js';
import 'custom-event-polyfill';
import 'url-polyfill';
import 'css-vars-ponyfill';
import '@babel/polyfill';
import 'intersection-observer';
我也尝试加载包或 webcomponentsjs-loader.js 并等待 WebComponentsReady 事件,但它也没有效果。
【问题讨论】:
标签: angular internet-explorer web-component