mirror of https://github.com/alibaba/ice.git
fix: fail to load latest module in ssr (#123)
* fix: fail to load latest module in server env * chore: update desc
This commit is contained in:
parent
8f4f79dae5
commit
a37b09a321
|
|
@ -12,7 +12,10 @@ type RouteModule = Pick<RouteItem, 'id' | 'load'>;
|
|||
|
||||
export async function loadRouteModule(route: RouteModule) {
|
||||
const { id, load } = route;
|
||||
if (id in routeModules) {
|
||||
if (
|
||||
typeof window !== 'undefined' && // Don't use module cache and should load again in ssr. Ref: https://github.com/ice-lab/ice-next/issues/82
|
||||
id in routeModules
|
||||
) {
|
||||
return routeModules[id];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue