fix(server-runtime): entferne Import von @vitejs/plugin-react im Server-HTML-Renderer; nutze Vite HMR Script direkt

This commit is contained in:
2025-10-01 22:20:34 +02:00
parent 74f55486bc
commit a80cb86cd5

View File

@@ -1,6 +1,5 @@
/** @jsxImportSource hono/jsx */
import type { Context } from "hono";
import viteReact from "@vitejs/plugin-react";
import type { BlankEnv } from "hono/types";
@@ -16,12 +15,7 @@ export function clientEntry(c: Context<BlankEnv>) {
<script src="/static/main.js" type="module" />
) : (
<>
<script
dangerouslySetInnerHTML={{
__html: viteReact.preambleCode.replace("__BASE__", "/"),
}}
type="module"
/>
<script src="/@vite/client" type="module" />
<script src="/src/client/main.tsx" type="module" />
</>
)}