Publish to JSR #1

Open
opened 2025-09-01 00:31:24 +02:00 by VityaSchel · 1 comment
VityaSchel commented 2025-09-01 00:31:24 +02:00 (Migrated from github.com)

Currently not possible due to lack of support of non-typescript files by JSR:

error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported.

See https://github.com/jsr-io/jsr/issues/861

Currently not possible due to lack of support of non-typescript files by JSR: ``` error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported. ``` See https://github.com/jsr-io/jsr/issues/861
VityaSchel commented 2025-09-01 15:11:46 +02:00 (Migrated from github.com)

I was able to publish ReactionButton.svelte to JSR but it is impossible to import it because it's not in package.json exports field. If I add it as export to jsr.json, JSR refuses to publish the package. Even if I manage to find a workaround, it seems JSR automatically transpiles all files to JavaScript after publishing, so I doubt Svelte will work with that. So far I have only found a single Svelte project published to JSR but the author included the Svelte itself into the bundle which caused its size to be over 3 MB.

I was able to [publish ReactionButton.svelte to JSR](https://jsr.io/@hloth/pow-reaction/1.0.4/src/lib/ReactionButton.svelte) but it is impossible to import it because it's not in package.json `exports` field. If I add it as export to jsr.json, JSR refuses to publish the package. Even if I manage to find a workaround, it seems JSR automatically transpiles all files to JavaScript after publishing, so I doubt Svelte will work with that. So far I have only found a single [Svelte project published to JSR](https://jsr.io/@shaarugesh/emoji-picker-svelte/1.0.3/dist/app.js) but the author included the Svelte itself into the bundle which caused its size to be over 3 MB.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hloth/pow-reaction#1
No description provided.