- configuration.module has an unknown property 'loader' 问题解决

 

错误提示:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module has an unknown property 'loader'. These properties are valid:
   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, loaders?, noParse?, rules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
   -> Options affecting the normal modules (`NormalModuleFactory`).

 

webpack v2 之后都用rules 了,把module里的那个loaders改成rules

     

 

posted @ 2018-07-20 16:58  九许尘歌  阅读(5221)  评论(0编辑  收藏  举报