diff --git a/lib/app/index.js b/lib/app/index.js index 7ba2b65132..fe30f2e479 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -44,7 +44,11 @@ const defaultTransition = <%= %> async function createApp (ssrContext) { - const router = createRouter(ssrContext) + if (createRouter.constructor.name === 'AsyncFunction') { + const router = await createRouter(ssrContext) + } else { + const router = createRouter(ssrContext) + } <% if (store) { %> const store = createStore(ssrContext)