/** @jsxImportSource hono/jsx */ import type { Context } from "hono"; import { readFileSync } from "fs"; import { join } from "path"; import type { BlankEnv } from "hono/types"; export function clientEntry(c: Context) { let jsFile = "/src/client/main.tsx"; let cssFiles: string[] | null = null; if (process.env.NODE_ENV === 'production') { try { // Read Vite manifest to get the correct file names const manifestPath = join(process.cwd(), 'dist', '.vite', 'manifest.json'); const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8')); const entry = manifest['index.html']; if (entry) { jsFile = `/${entry.file}`; if (entry.css) { cssFiles = entry.css.map((css: string) => `/${css}`); } } } catch (error) { console.warn('Could not read Vite manifest, using fallback:', error); // Fallback to a generic path jsFile = "/assets/index-Ccx6A0bN.js"; cssFiles = ["/assets/index-RdX4PbOO.css"]; } } return c.html( Stargirlnails Kiel {cssFiles && cssFiles.map((css: string) => ( ))} {process.env.NODE_ENV === 'production' ? (