小编rom*_*oms的帖子

Webpack 开发服务器配置 - contentBase 在最新版本中不起作用

当我将 webpack 升级到 4.0.0-beta.3 并运行时,npx webpack serve出现以下错误:

[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
 - configuration has an unknown property 'contentBase'. These properties are valid:
   object { bonjour?, client?, compress?, devMiddleware?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, public?, setupExitSignals?, static?, transportMode?, watchFiles? }
Run Code Online (Sandbox Code Playgroud)

这是我的 webpack.config.js,适用于 3.11.2:

const path = require('path');
const ArcGISPlugin = require("@arcgis/webpack-plugin");

module.exports = {
  mode: …
Run Code Online (Sandbox Code Playgroud)

webpack webpack-dev-server webpack-cli

72
推荐指数
4
解决办法
6万
查看次数

标签 统计

webpack ×1

webpack-cli ×1

webpack-dev-server ×1