问答详情
源自:4-2 使用 babel-loader 转换 ES6 代码(上)

4-2 11:25秒处 babel的配置我按照老师写的报错

老师是这样写的http://img1.mukewang.com/5aa4b3890001541403760263.jpg

但是报错了

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

 - configuration.module has an unknown property 'loaders'. These properties are valid:

   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }

   -> Options affecting the normal modules (`NormalModuleFactory`).

后来看到官网是类似这样写的http://img1.mukewang.com/5aa4b3bb0001a93204340320.jpg

提问者:罐头冠 2018-03-11 12:42

个回答

  • 慕用5230971
    2018-03-12 14:46:45
    已采纳

    webpack版本不一样。老师那个版本是老古董了