fix(server-runtime): entferne Import von @vitejs/plugin-react im Server-HTML-Renderer; nutze Vite HMR Script direkt
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
/** @jsxImportSource hono/jsx */
|
/** @jsxImportSource hono/jsx */
|
||||||
import type { Context } from "hono";
|
import type { Context } from "hono";
|
||||||
import viteReact from "@vitejs/plugin-react";
|
|
||||||
|
|
||||||
import type { BlankEnv } from "hono/types";
|
import type { BlankEnv } from "hono/types";
|
||||||
|
|
||||||
@@ -16,12 +15,7 @@ export function clientEntry(c: Context<BlankEnv>) {
|
|||||||
<script src="/static/main.js" type="module" />
|
<script src="/static/main.js" type="module" />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<script
|
<script src="/@vite/client" type="module" />
|
||||||
dangerouslySetInnerHTML={{
|
|
||||||
__html: viteReact.preambleCode.replace("__BASE__", "/"),
|
|
||||||
}}
|
|
||||||
type="module"
|
|
||||||
/>
|
|
||||||
<script src="/src/client/main.tsx" type="module" />
|
<script src="/src/client/main.tsx" type="module" />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user