#Using libraries from JSR in SvelteKit

1 messages · Page 1 of 1 (latest)

modest ledge
#

Hi! I'm playing around with using SvelteKit with Deno 2, and tried to import a library from Deno's standard library to use that with SvelteKit. This, however, adds it into deno.json instead of package.json and I'm not able to import it in Svelte code. What would be needed to be able to import modules from JSR and make them work in SvelteKit?

dense spire
#

Try using the jsr binary, eg. npx jsr add @std/fmt

modest ledge
#

feels a bit convoluted, but alright 😅

dense spire
#

Yeah, it is convoluted

#

We are aware of this problem - it's because SvelteKit uses a bundler that currently doesn't understand jsr: imports in deno.json

#

We're trying to fix the situation to make it more approachable

modest ledge
#

Ah okay, yeah that makes sense. Thank you for the response! :)