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 try to use JSR in the context of front end libraries and a browser app. I published @shapething/shacl-renderer. When trying to import it in Vite the commonjs dependencies are not transpiled / picked up.
Uncaught Error: Module "npm:jsonld-context-parser@^3.0.0" has been externalized for browser compatibility. Cannot access "npm:jsonld-context-parser@^3.0.0.JsonLdContextNormalized" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
get __vite-browser-external:npm:jsonld-context-parser@^3.0.0:3
<anonymous> main.tsx:1
__vite-browser-external:npm:jsonld-context-parser@^3.0.0:3:12
The problem seems to be that the package is not resolved when running the project. It is transpiled into this:
Use case
I try to use JSR in the context of front end libraries and a browser app. I published @shapething/shacl-renderer. When trying to import it in Vite the commonjs dependencies are not transpiled / picked up.
Minimal working example
https://github.com/danielbeeke/mwe-jsr-react-commonjs
Error
The problem seems to be that the package is not resolved when running the project. It is transpiled into this:
The text was updated successfully, but these errors were encountered: