[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema
 
devServer: {
    contentBase: './src',  // 告诉服务器从哪里提供内容,默认情况下,它会使用当前工作目录作为根目录
    compress: true,  // 启用 gzip 压缩
    port: 9000,  // 端口号
    open: true,  // 在服务器启动时打开浏览器
    hot: true,  // 启用模块热替换(HMR)
    historyApiFallback: true,  // 当使用 HTML5 History API 时,任意的 404 响应都可能需要被替代为 index.html
}
 
新版 webpack contentBase 换成了 static,错误提示中也指明了,contentBase 不在配置中















![[C++初阶] 爱上C++ : 与C++的第一次约会](https://img-blog.csdnimg.cn/direct/e6b7de6df3ca49cba01fe2d41bd77a72.png)



