Skip to content

Commit 492299a

Browse files
committed
adjust server entry
1 parent d2bb772 commit 492299a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/server-entry.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { app, router, store } from './app'
22

33
export default context => {
4-
// When using vue-router, it will automatically pick up the url from the
5-
// context. We just need to resolve the store state.
6-
var s = Date.now()
4+
// set router's location
5+
router.push(context.url)
6+
// call prefetch hooks on components matched by the route
7+
const s = Date.now()
78
return Promise.all(router.getMatchedComponents().map(component => {
89
if (component.prefetch) {
910
return component.prefetch(store)

0 commit comments

Comments
 (0)