You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deno.compile() has an option to take a map of source file. In this option specifiers for files can be written as /foo.ts, /bar.js. It's against other Deno APIs which require valid specifiers and required to add some hackery to make it work:
They are in theory "abstract" resources... requiring them to be them seems quite illogical to me and doesn't sound like good DX. Why even provide the baseUrl option? Again, that is just to keep things "tidy" on the inside, and bad DX to force a user to do something that means nothing to them. I didn't catch it in the PR, but now I understand the problem. It feels like we could more systematically deal with it by just mangling all the sources when they are provided like that without requiring a user to specify a baseUrl and basically tell them "please fake this information because we don't want to".
Also, this particular cleanup might want to wait for #4752 (or we move forward with that) and we would have a discreet API for providing sources, instead of the more conflated one and it maybe easier to resolve the modules in a clean way.
https://doc.deno.land/https/raw.githubusercontent.com/denoland/deno/master/cli/js/lib.deno.unstable.d.ts#Deno.compile
Deno.compile()
has an option to take a map of source file. In this option specifiers for files can be written as/foo.ts
,/bar.js
. It's against other Deno APIs which require valid specifiers and required to add some hackery to make it work:deno/cli/module_graph.rs
Lines 172 to 181 in 1be7ec4
deno/cli/js/compiler.ts
Lines 605 to 617 in 1be7ec4
Discussed this situation offline with @ry are there are two potential solutions:
baseUrl
option toDeno.compile()
which will be used to create URLs for each specifierCC @kitsonk
The text was updated successfully, but these errors were encountered: