Open aleksasiriski opened 2 months ago
You can workaround this by specifying handler as one of the exports in your jsr.json
.
Since "handler" is a adapter for SvelteKit it "imports" some files that don't exist in the repo but will exist after being copied into the SvelteKit build folder, and this breaks publishing on JSR: https://github.com/hearchco/sveltekit-adapter-aws/actions/runs/9910061704/job/27379574375#step:7:10
Ah I see - then for the moment, as a workaround, you can try renaming the file to handler/index.js.txt
(no .js
file extension). This will stop the rewriting from happening at all.
Definitely a bug during publishing on our side.
Hmm, but then I would need to rename it back to .js
for SvelteKit to to use properly? I think it's better to wait for the fix instead of using workarounds :) If you point me in the right direction I would be happy to look at this codebase and try to find and fix the bug.
Any updates on this?
I'm building a SvelteKit adapter and am trying to publish it on jsr.io, is uses two imports:
Both of those when uploaded to jsr.io get changed to:
Only the esbuild one when pulled via
pnpm dlx jsr add @hearchco/sveltekit-adapter-aws
gets changed back to original:This is causing my SvelteKit built to error out with, and if I manually change it to original in the node_modules the build is successful: