错误截图:

解决方法:
// 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)
}
})
