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
During implementation of import maps for Deno I believe I read that import maps shouldn't be applied to root script as well as workers root script, but now I can't find any mention about it now.
$ deno --importmap importmap.json run https://deno.land/std/http/file_server.ts
// should script be loaded from original URL or should it use remapped './foo/bar.ts'?
worker example:
// some_entry_point.tsconstworker=newWorker("https://deno.land/std/http/file_server.ts");// should script be loaded from original URL or should it use remapped './foo/bar.ts'?
Could you clarify that @domenic? Thanks in advance.
The text was updated successfully, but these errors were encountered:
This is largely a decision for deno to make. Does it take as input URLs, or module specifiers? URLs (which on the web show up in places like <script src="url"> or <link rel="modulepreload" href="url">) don't get remapped by import maps; that's why we have future proposals for import: URLs and import.meta.resolve(). Module specifiers do get remapped.
I can tell you that on the web, new Worker() takes a URL, so it wouldn't get remapped.
Inside the Worker is a whole 'nother story; currently you cannot use import maps inside workers according to this spec, but that's a TODO as discussed in #2.
During implementation of import maps for Deno I believe I read that import maps shouldn't be applied to root script as well as workers root script, but now I can't find any mention about it now.
Example:
Could you clarify that @domenic? Thanks in advance.
The text was updated successfully, but these errors were encountered: