Refactor as SSG using Vite+React
This commit is contained in:
parent
a22071815d
commit
6830bd41dd
25 changed files with 3076 additions and 282 deletions
14
src/entry-client.tsx
Normal file
14
src/entry-client.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
// Entry point for development
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import Body from "./Body";
|
||||
import Head from "./Head";
|
||||
|
||||
if (!import.meta.env.SSR) {
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<Head />
|
||||
<Body />
|
||||
</StrictMode>,
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue