Karma、Jasmine、JSPM、Babel base.preset 错误

Karma,Jasmine,JSPM, Babel base.preset error

我正在尝试同时使用 Karma、Jasmine、JSPM 和 Babel。我似乎遇到了一个错误,我不确定如何跟踪:

12 04 2016 19:59:04.407:ERROR [preprocessor.babel]: [BABEL] /Users/allen/work/twentytwenty.qualboard/src/TwentyTwenty.QualBoard.Web/wwwroot/config.js: Unknown option: base.preset. Check out http://babeljs.io/docs/usage/options/ for more info

它咆哮着 config.js 和选项 base.preset。我不确定为什么认为我已经对 base.preset 进行了完整的项目搜索,但找不到它的存在。

业力配置:

module.exports = function(config) {
  config.set({
    autoWatch: false,

    babelPreprocessor: {
      options: {
        preset: ['es2015'],
        sourceMap: 'inline',
      },
    },

    basePath: '',

    browsers: [
      'PhantomJS',
    ],

    colors: true,

    concurrency: Infinity,

    coverageReporter: {
      type: 'html',
      dir: 'converage/',
    },

    exclude: [],

    files: [],

    frameworks: [
      'jspm',
      'jasmine',
    ],

    jspm: {
      config: './wwwroot/config.js',
      packages: './wwwroot/jspm_packages',
      loadFiles: [
        'test/**/*.js',
      ],
      serveFiles: [
        'test/**/*.js',
      ],
    },

    logLevel: config.LOG_INFO,

    plugins: [
      'karma-babel-preprocessor',
      'karma-coverage',
      'karma-jasmine',
      'karma-jspm',
      'karma-phantomjs-launcher',
      'karma-spec-reporter',
    ],

    port: 9876,

    preprocessors: {
      './wwwroot/config.js': ['babel'],
      './wwwroot/aurelia/**/*.js': ['babel'],
      './wwwroot/test/**/*.js': ['babel', 'coverage'],
    },

    proxies: {
      '/wwwroot/': '/TwentyTwenty.Qualboard.Web/wwwroot/',
      '/jspm_packages/': '/wwwroot/jspm_packages',
    },

    reporters: [
      'coverage',
      'spec',
    ],

    singleRun: true,

    specReporter: {
      maxLogLines: 1,
      suppressErrorSummary: true,
      suppressFailed: false,
      suppressPassed: false,
      supressSkipped: false,
    },

  });
};

我的 BabelRc:

{
  "presets": ["es2015"]
}

我通过以下方式在终端中启动 Karma: karma start

我错过了什么?

你打错字了,是预设s而不是预设:

babelPreprocessor: {
  options: {
    presets: ['es2015'],
    sourceMap: 'inline',
  },
}