【问题标题】:ES6 transpilation is only provided in the dev module loader build, error with es6-module-loaderES6 转译仅在 dev 模块加载器构建中提供,es6-module-loader 出错
【发布时间】:2015-08-22 10:01:53
【问题描述】:

为什么我使用 es6-module-loader 会出现这个错误:

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

【问题讨论】:

    标签: javascript babeljs es6-module-loader


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-18
      • 1970-01-01
      • 2016-06-07
      • 1970-01-01
      • 2018-02-18
      • 1970-01-01
      相关资源
      最近更新 更多