我正在设置我的aurelia应用程序:
import "babel-polyfill";
export function configure(aurelia) {
// some config code
}
这就是我得到的错误:
Potentially unhandled rejection [3] (SystemJS) Error: Out of stack space
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
at d (eval code:6:23405)
Evaluating http://localhost:9000/jspm_packages/npm/core-js@2.4.1/modules/es6.map.js
Evaluating http://localhost:9000/jspm_packages/npm/core-js@2.4.1/shim.js
Evaluating http://localhost:9000/jspm_packages/npm/babel-polyfill@6.13.0/lib/index.js
Evaluating http://localhost:9000/jspm_packages/npm/babel-polyfill@6.13.0.js
Error loading http://localhost:9000/jspm_packages/npm/babel-polyfill@6.13.0.js
如果我不包含babel-polyfill
但不使用它,则可以正常工作,因为我需要使用它。这里的问题是:如何在不遇到此错误的情况下继续使用babel-polyfill?
答案 0 :(得分:1)
为了实现这一点,我必须更改index.html
以包含此内容:
System.import('scripts/core-js.js')
.then(function() {
System.import('aurelia-bootstrapper');
});
我从这里下载了core-js.js
文件:https://raw.githubusercontent.com/zloirock/core-js/master/client/core.js虽然您可以从npm获取它并将其放在脚本文件夹中。只要上面的导入指向它,我相信你可以把它放在任何地方。