// The AppShell must be imported before the __NODE_PAGE_MODULES to ensure CSS order consistancy // @ts-expect-error // eslint-disable-next-line import-x/order import AppShell from '__THE_ENTRY'; import { StaticRouter } from '@crackle/router/server'; // eslint-disable-next-line import-x/order import nodePageModules from '__NODE_PAGE_MODULES'; import serializeJavascript from 'serialize-javascript'; import { LoadingIcon } from '../loading-icon'; import { extractRouteMetadata } from '../route-metadata'; import type { PageData, RouteMap } from '../types'; interface RenderPageProps { path: string; headTags: React.ReactNode; bodyTags: React.ReactNode; pageData: PageData; criticalCssPlaceholder?: string; children: React.ReactNode; } export const Page = ({ path, headTags, bodyTags, pageData, criticalCssPlaceholder, children, }: RenderPageProps) => { const metadata = extractRouteMetadata(pageData.routeMap); return (
{headTags} {criticalCssPlaceholder ?? null} {import.meta.env.DEV &&