赞
踩
报错信息:
Uncaught runtime errors:
×
ERROR
Unknown promise rejection reason
at handleError (webpack-internal:///./node_modules/webpack-dev-server/client/overlay.js:296:58)
at eval (webpack-internal:///./node_modules/webpack-dev-server/client/overlay.js:319:7)
原因:
当出现编译错误或警告时,在浏览器中显示全屏覆盖。
解决方法:
在vue.config.js中添加如下配置,重启项目即可
module.exports = defineConfig({
devServer: {
client: {
overlay: false,
},
}
})
https://webpack.docschina.org/configuration/dev-server/#overlay
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。