0
点赞
收藏
分享

微信扫一扫

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object

七千22 2022-03-11 阅读 132

问题内容:

[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'contentBase'. These properties are valid:
   object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, static?, watchFiles?, webSocketServer? }

问题解决:

  devServer: {
    // contentBase: "./public",
    static:'./public',
  }
举报

相关推荐

0 条评论