fix(built-in): 避免在beforeRender action中操作路由或者location.href,构建后会出现卡死

This commit is contained in:
wanchun 2023-03-28 21:04:08 +08:00
parent fdf548d6c3
commit 9641b0dc67

View File

@ -66,7 +66,10 @@ export const createRouter = (routes) => {
document.body.removeChild(rootElement); document.body.removeChild(rootElement);
} }
} }
next(); // 避免在beforeRender action中操作路由或者location.href构建后会出现卡死
setTimeout(() => {
next();
}, 0);
}) })
plugin.applyPlugins({ plugin.applyPlugins({