忽略"ResizeObserver loop limit exceeded"和"ResizeObserver loop completed with undelivered notifications."兩種錯誤。
向vue.config.js中新增以下程式碼:
module.exports = defineConfig({
...
devServer: {
client: {
overlay: {
warnings: false,
runtimeErrors: (error) => {
const ignoreErrors = [
"ResizeObserver loop limit exceeded",
"ResizeObserver loop completed with undelivered notifications.",
];
if (ignoreErrors.includes(error.message)) {
return false;
}
},
},
},
},
});