start transpile adjacent server files
This commit is contained in:
parent
6878e7e0a4
commit
a9e4c0bb35
12
local.tsx
12
local.tsx
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user