添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
乖乖的围巾  ·  简单聊下.NET6 Minimal ...·  1 年前    · 
聪明伶俐的刺猬  ·  解决“The ...·  1 年前    · 
精彩文章免费看

webpack打包时提示Invalid configuration object

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

  • configuration has an unknown property 'mode'. These properties are valid:
    object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
    For typos: please correct them.
    For loader options: webpack 2 no longer allows custom properties in configuration.
    Loaders should be updated to allow passing options via loader options in module.rules.
  • 原因就是我这个webpack的版本太低了,在webpack.config.js中配置了mode: "development",
    把这个注释掉就可以正常打包了