app/client-entry.js
async function main() {
  event.$emit('before-client-render')

  if (globalState.initialData) {
    dataStore.replaceState(globalState.initialData)
  }

  await routerReady(router)

  if (router.getMatchedComponents().length === 0) {
    throw new ReamError(pageNotFound(router.currentRoute.path))
  }
}
async function main() {
  event.$emit('before-client-render')

  if (globalState.initialData) {
    dataStore.replaceState(globalState.initialData)
  }

  await routerReady(router)

  if (router.getMatchedComponents().length === 0) {
    throw new ReamError(pageNotFound(router.currentRoute.path))
  }
}
async function main ( ) { event . $emit ( 'before-client-render' ) if ( globalState . initialData ) { dataStore . replaceState ( globalState . initialData ) } await routerReady ( router ) if ( router . getMatchedComponents ( ) . length === 0 ) { throw new ReamError ( pageNotFound ( router . currentRoute . path ) ) } }
Wait until router has resolved all async before hooks and async components...
Wait until router has resolved all async before hooks and async components ...