vue前端页面弹出红色报错遮罩层 Uncaught runtime errors:at handleError (webpack-internal:///./node_modules/webpack
vue前端页面弹出红色遮罩层错误 Uncaught runtime errors:×ERRORUnknown promise rejection reasonat handleError (webpack-internal:///./node_modules/webpack-dev-server/client/overlay.js:296:58)at eval
·
报错信息:
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
更多推荐
已为社区贡献2条内容
所有评论(0)