boot-function #1

Merged
SethTrowbridge merged 25 commits from boot-function into master 2023-06-21 07:53:14 -04:00
Showing only changes of commit a9e4c0bb35 - Show all commits

View File

@ -31,8 +31,18 @@ Configure({
});
return inImports;
},
Serve(inReq, inURL, inExt, inMap)
async Serve(inReq, inURL, inExt, inMap)
{
if(inURL.pathname.startsWith("/hmr/"))
{
const path = import.meta.url+"/.."+inURL.pathname;
const code = await Transpile.Fetch(path, inURL.pathname, true);
if(code)
{
return new Response(code, {headers:{"content-type":"application/javascript"}})
}
}
if(inReq.headers.get("upgrade") == "websocket")
{
try