Replies: 1 comment
-
Any workarounds? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When attempting to publish a Svelte component library to the JSR registry, the publish process fails with the error
Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported.
The error appears to be caused by
dist/index.js
containing references to.svelte
files, which JSR doesn't recognize as valid module types. Is the recommended solution to transpile all.svelte
files to.js
before publishing? Does the Svelte compiler support this?Several Svelte libraries are already available on JSR, but the build process for component libraries isn't clear from any of the documentations.
Reproduction
https://github.com/kotkoroid/repl-svelte-library-jsr-publish
Logs
johndoe@Johns-MacBook-Air repl-svelte-library-jsr-publish % bunx jsr publish Downloading JSR release binary... [00:01] [#################################################>] 35.7 MiB/36.5 MiB error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported. Specifier: file:///Users/johndoe/Workspace/Dev/repl-svelte-library-jsr-publish/dist/components/Heading.svelte at file:///Users/johndoe/Workspace/Dev/repl-svelte-library-jsr-publish/dist/index.js:1:36 Child process exited with: 1
System Info
Severity
blocking all usage of svelte
Beta Was this translation helpful? Give feedback.
All reactions