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
Version: Deno 1.44.1 and greater (including Deno 2)
I just realized npm specifiers have changed its behavior with import.meta.resolve in Deno 1.44.1 and this breaks the esbuild plugin of Deno in some cases (like in this example).
For example, let's say I have the following import map:
As you can see, sometimes the resolver returns the file URL to the local cache file, some times it returns the npm specifier.
Is this the expected behavior? Is there any way to make it work like before? I want to detect if a bare import (like react) is pointing to a npm specifier or not. I don't want the local cache file.
The text was updated successfully, but these errors were encountered:
oscarotero
changed the title
import.meta.resolve with npm specifiers
import.meta.resolve with npm specifiers inconsistency
Dec 20, 2024
Version: Deno 1.44.1 and greater (including Deno 2)
I just realized npm specifiers have changed its behavior with
import.meta.resolve
in Deno 1.44.1 and this breaks the esbuild plugin of Deno in some cases (like in this example).For example, let's say I have the following import map:
In Deno 1.44.0:
In Deno 1.44.1 or Deno 2:
As you can see, sometimes the resolver returns the file URL to the local cache file, some times it returns the npm specifier.
Is this the expected behavior? Is there any way to make it work like before? I want to detect if a bare import (like
react
) is pointing to anpm
specifier or not. I don't want the local cache file.The text was updated successfully, but these errors were encountered: