I have a few questions regarding package management in Deno.
- Here Deno documentation states that import maps are only applied to applications, and that library authors should prefer the deps.ts pattern.
Contrarily, the jsr documentation specifies that a dependency manifest like the import map in the deno.json file can be used by a library. Does this mean that the deps.ts pattern is now obsolete?
-
How do I use packages published with jsr in a browser environment? Using esm.sh, I can do
import ... from "https://esm.sh/[email protected]". Can I do the same with jsr? -
In jsr, all entry points have to be specified explicitly, so we no longer need to add a package with a trailing slash in the import map to import modules beyond the default entry point. Is this correct?
-
How do I replicate a configuration like this in jsr, specifically specifying external dependencies and aliases?
"imports": {
...
"@headlessui/react": "https://esm.sh/@headlessui/[email protected]?external=react,react-dom&alias=@types/react:preact/compat",
...
},