vue2 配置vue.config.js devServer 时报错
配置vue.config.js devServer 后,启用项目报错。
报错信息:
ERROR ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options has an unknown property 'overlay'. 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?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options has an unknown property 'overlay'. 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?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
at validate (G:\stevenchen\LDProject\ldadminvue\node_modules\webpack-dev-server\node_modules\schema-utils\dist\validate.js:115:11)
at new Server (G:\stevenchen\LDProject\ldadminvue\node_modules\webpack-dev-server\lib\Server.js:231:5)
at serve (G:\stevenchen\LDProject\ldadminvue\node_modules\@vue\cli-service\lib\commands\serve.js:194:20)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
----------vue.config.js 代码如下---------------------------------------------------------------------------------------