Javascript ES6 transpilation仅在开发模块加载器构建中提供,ES6模块加载器错误

Javascript ES6 transpilation仅在开发模块加载器构建中提供,ES6模块加载器错误,javascript,babeljs,es6-module-loader,Javascript,Babeljs,Es6 Module Loader,为什么es6模块加载程序会出现此错误: ES6 transfilation仅在dev模块加载器构建中提供。 下面是我尝试使用的代码: System.transpiler = 'babel'; System.import('app/main.js').then(function (module) { new module.Main(); }); main.js: import foo from './foo' export class Main { constructor() {

为什么es6模块加载程序会出现此错误:

ES6 transfilation仅在dev模块加载器构建中提供。

下面是我尝试使用的代码:

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"
  }

您需要
es6-module-loader-dev.js
。看