vue项目路由懒加载,用户打开页面情况下,发版项目点击提示路由文件找不到

router.onError((error) => {  console.log(‘router onError’, error);  const pattern = /Loading chunk (\d)+ failed/g;  const isChunkLoadFailed = error.message.match(pattern);  console.log(‘match’, isChunkLoadFailed);  const targetPath = router.history.pending.fullPath;  let hash = ”;  if (isChunkLoadFailed) {    setTimeout(() => {      let search = location.search;      if (search && search.indexOf(‘?’) > -1) {        search += (‘&random=’ + new Date().getTime());      } else {        search += (‘?random=’ + new Date().getTime());      }      location.replace(location.origin + location.pathname + search + location.hash);    }, 500);    // router.replace(targetPath);  }});