deprecate-deno-deploy #24
@ -4,9 +4,8 @@
|
|||||||
]},
|
]},
|
||||||
"imports": {
|
"imports": {
|
||||||
"react": "https://esm.sh/preact@10.13.2/compat",
|
"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",
|
"react-original": "https://esm.sh/preact@10.13.2/compat",
|
||||||
"@eno/app": "./example/app.tsx",
|
|
||||||
"@eno/iso": "./lib/iso.tsx"
|
"@eno/iso": "./lib/iso.tsx"
|
||||||
},
|
},
|
||||||
"tasks":
|
"tasks":
|
||||||
|
@ -5,10 +5,9 @@
|
|||||||
"react": "https://esm.sh/stable/preact@10.13.2/compat",
|
"react": "https://esm.sh/stable/preact@10.13.2/compat",
|
||||||
"preact": "https://esm.sh/stable/preact@10.13.2/",
|
"preact": "https://esm.sh/stable/preact@10.13.2/",
|
||||||
"@deep/": "./deep/",
|
"@deep/": "./deep/",
|
||||||
"@eno/app": "./app.tsx",
|
|
||||||
"@eno/iso": "http://localhost:4507/lib/iso.tsx"
|
"@eno/iso": "http://localhost:4507/lib/iso.tsx"
|
||||||
},
|
},
|
||||||
"tasks": {
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
20
server.tsx
20
server.tsx
@ -305,25 +305,7 @@ async function Server(App:React.FunctionComponent, AppPath:string, TwindInst:Twi
|
|||||||
}
|
}
|
||||||
else if(url.pathname == "/server.tsx")
|
else if(url.pathname == "/server.tsx")
|
||||||
{
|
{
|
||||||
body = `
|
body = await TranspileURL(`${Path.Hosted}/${Path.LibDir}/boot-client.tsx`, url.pathname, true);
|
||||||
|
|
||||||
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")
|
|
||||||
);
|
|
||||||
|
|
||||||
}`;
|
|
||||||
}
|
}
|
||||||
else if(DevMode && !url.searchParams.get("reload"))
|
else if(DevMode && !url.searchParams.get("reload"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user