diff --git a/deno.json b/deno.json index 14eb980..1cd8ff9 100644 --- a/deno.json +++ b/deno.json @@ -4,9 +4,8 @@ ]}, "imports": { "react": "https://esm.sh/preact@10.13.2/compat", - + "preact": "https://esm.sh/preact@10.13.2/compat", "react-original": "https://esm.sh/preact@10.13.2/compat", - "@eno/app": "./example/app.tsx", "@eno/iso": "./lib/iso.tsx" }, "tasks": diff --git a/example/deno.jsonc b/example/deno.jsonc index 2c2f6e0..521187d 100644 --- a/example/deno.jsonc +++ b/example/deno.jsonc @@ -5,10 +5,9 @@ "react": "https://esm.sh/stable/preact@10.13.2/compat", "preact": "https://esm.sh/stable/preact@10.13.2/", "@deep/": "./deep/", - "@eno/app": "./app.tsx", "@eno/iso": "http://localhost:4507/lib/iso.tsx" }, "tasks": { - "dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx --dev" + "dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx" } } \ No newline at end of file diff --git a/server.tsx b/server.tsx index 49bccdb..a1ea483 100644 --- a/server.tsx +++ b/server.tsx @@ -305,25 +305,7 @@ async function Server(App:React.FunctionComponent, AppPath:string, TwindInst:Twi } else if(url.pathname == "/server.tsx") { -body = ` - -import {hydrate, createElement as H} from "react"; -import * as Twind from "https://esm.sh/v115/@twind/core@1.1.3/es2022/core.mjs"; -import {Router, CSS, Meta} from "@eno/iso"; -export function Boot(inApp, inCSS) -{ - console.log(inApp, inCSS); - Twind.install(inCSS ? {...CSS, ...inCSS} : CSS); - - const hmrWrap = H( ()=>H(inApp) ); - hydrate( - H(Router.Provider, {url:window.location}, - H(Meta.Provider, null, hmrWrap) - ), - document.querySelector("#app") - ); - -}`; + body = await TranspileURL(`${Path.Hosted}/${Path.LibDir}/boot-client.tsx`, url.pathname, true); } else if(DevMode && !url.searchParams.get("reload")) {