为什么我会在ES6-模块加载程序中得到这个错误:
ES6 transpilation is only provided in the dev module loader build.
下面是我试图使用的代码:
System.transpiler = 'babel';
System.import('app/main.js').then(function (module) {
new module.Main();
});main.js:
import foo from './foo'
export class Main {
constructor() {
}
}package.json:
devDependencies": {
"babel-core": "^5.8.22",
"es6-module-loader": "^0.17.6",
"object.observe": "^0.2.4",
"qunitjs": "^1.18.0"
}发布于 2015-09-09 22:15:25
你需要es6-module-loader-dev.js。请参阅https://github.com/ModuleLoader/es6-module-loader#getting-started
https://stackoverflow.com/questions/32154811
复制相似问题