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
I'm really excited about JSR and I started migrating the few packages I maintain (mostly for myself given their popularity 😅) from Node + NPM to Deno + JSR:
It worked quite well so far but I ran into a issue: In some of my project I had a folder with a Vite project to showcase an example of the package.
I managed to get Vite running in Deno and using --node-modules-dir and I can import npm packages fine but not JSR packages.
I see 2 potential solution to this:
1. Vite plugin
Option 1 would be to have a Vite plugin for Deno that would implement the same module resolution.
There is already some existing but I did not found any that supports jsr.
On that note, are there any plan to expose the module resolver from Deno to make it easier to create such tool ?
The downside of this solution is that it would be a Vite only solution and won't work for other bundlers.
2. Expose JSR packages in node_modules
Another option would be to make Deno also expose JSR packages in node_modules when running --node-modules-dir, this way the classic Node module resolution would also work.
The text was updated successfully, but these errors were encountered:
Side note: since I could not make it work with Vite I used esbuild and @luca/esbuild-deno-loader in the meantime, you can see it in this repo: dldc-packages/canvas.
But I would much prefer to be able to use Vite as it's a more common setup and requires less tinkering than Esbuild.
Hi,
I'm really excited about JSR and I started migrating the few packages I maintain (mostly for myself given their popularity 😅) from
Node + NPM
toDeno + JSR
:It worked quite well so far but I ran into a issue: In some of my project I had a folder with a Vite project to showcase an example of the package.
I managed to get Vite running in Deno and using
--node-modules-dir
and I can import npm packages fine but not JSR packages.I see 2 potential solution to this:
1. Vite plugin
Option 1 would be to have a Vite plugin for Deno that would implement the same module resolution.
There is already some existing but I did not found any that supports
jsr
.On that note, are there any plan to expose the module resolver from Deno to make it easier to create such tool ?
The downside of this solution is that it would be a Vite only solution and won't work for other bundlers.
2. Expose JSR packages in
node_modules
Another option would be to make Deno also expose JSR packages in
node_modules
when running--node-modules-dir
, this way the classic Node module resolution would also work.The text was updated successfully, but these errors were encountered: