錯誤截圖:
解決方法:
// loading chunk 出錯處理 router.onError((error) => { const pattern = /Loading chunk (\d)+ failed/g const isChunkLoadFailed = error.message.match(pattern) const targetPath = router.history.pending.fullPath if (isChunkLoadFailed) { router.replace(targetPath) } })