no support for .ts
npx wrangler pages dev -- SERVER COMMAND . You are also able to get the logs of your functions by pressing "d"._worker file to configured with wrangler v3.22.1. Tested with a fresh npm create cloudflare@latest install with svelte . Picked both the TypeScript and JavaScript versions but neither are working

new URL as the second parameter, so you could do something like:new URL(context.request.url), and then pass the .hostname of that into that new constructor, or just override its .pathname etc. to construct your redirect URLlocation header, so perhaps even this could work (untested):_workerv3.22.1npm create cloudflare@latestnew URLnew URL(context.request.url).hostname.pathnamelocationexport default {
async fetch(request, env) {
const url = new URL(request.url);
if (url.pathname.startsWith('/api/')) {
return new Response('Ok');
}
return env.ASSETS.fetch(request);
}
};const redirectURL = new URL('/login/', 'https://example.com');
return Response.redirect(redirectURL.toString());return new Response(null, {
status: 302,
headers: {
location: '/login/',
}
});