code: 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))
    }
  }
docs: Wait until router has resolved all async before hooks and async components...