UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

14 lines (13 loc) 747 B
export { getGlobalContextClientInternal }; import { createGetGlobalContextClient } from '../shared/createGetGlobalContextClient.js'; import { loadPageRoutes } from '../../shared/route/loadPageRoutes.js'; // @ts-ignore import * as virtualFileExports from 'virtual:vike:entry:client:client-routing'; const getGlobalContextClientInternal = createGetGlobalContextClient(virtualFileExports, true, addGlobalContext); async function addGlobalContext(globalContext) { const { pageRoutes, onBeforeRouteHook } = await loadPageRoutes(globalContext._pageFilesAll, globalContext._pageConfigs, globalContext._pageConfigGlobal, globalContext._allPageIds); return { _pageRoutes: pageRoutes, _onBeforeRouteHook: onBeforeRouteHook, }; }