Skip to content

Commit f6b505d

Browse files
committed
disable route preloading
1 parent 2b21a7c commit f6b505d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

runtime.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ function render(Component, data, scroll, token) {
7171
detach(start);
7272
detach(end);
7373
}
74+
// monkey-patch: disable all route preloading, can't tell why this even exists
7475
// preload additional routes
75-
routes.reduce(function (promise, route) { return promise.then(route.load); }, Promise.resolve());
76+
//routes.reduce((promise: Promise<any>, route) => promise.then(route.load), Promise.resolve());
7677
}
7778
component = new Component({
7879
target: target,

src/runtime/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ function render(Component: ComponentConstructor, data: any, scroll: ScrollPositi
5757
detach(end);
5858
}
5959

60+
// monkey-patch: disable all route preloading, can't tell why this even exists
6061
// preload additional routes
61-
routes.reduce((promise: Promise<any>, route) => promise.then(route.load), Promise.resolve());
62+
//routes.reduce((promise: Promise<any>, route) => promise.then(route.load), Promise.resolve());
6263
}
6364

6465
component = new Component({

0 commit comments

Comments
 (0)