Open
Description
Description
As a developer using Vite and jsr.io I would like to be able to load module specifiers such as npm:@iconify-icon/react@^3.0.0/dist/iconify.mjs
in Vite while using node and NPM.
The part that is not working, is picking up the module specifiers and then transpiling commonjs modules.
Suggested solution
Support loading specifiers such as npm:@iconify-icon/react@^3.0.0/dist/iconify.mjs
by rewriting them to iconify-icon/react/dist/iconify.mjs
and also triggering the commonjs plugin on it to transpile to the contents.
Alternative
I tried creating a plugin for this. For resolveId I was able to get it to work, however the commonjs part seems to be a separate process where it is statically calculated. Is this a correct assumption?
Additional context
Related issue on jsr repo:
jsr-io/jsr#1097
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
No labels