Can you explain what do you mean by template URLs? Do you mean route params like `/v1/functions/users/:id`? If so, you can use a framework like Oak[1] to handle them. Edge Functions will make the full path including querystring available to the router.
Also, you can use URLPattern API to match paths. Here's an example of RESTful API built using that: https://github.com/supabase/supabase/blob/master/examples/ed...
Source maps, is it broken during local dev or when you deploy the function? Also, by broken you mean in a stack trace the file / line numbers aren't accurate?