sveld
sveld copied to clipboard
Upgrade package dependencies, include svelte-preprocess, Rollup plugins etc..
but if this repo upgrades its dependency on
svelte-preprocessthat will slim things down for you as well. A couple of other dependencies like rollup look like they could be bumped as well which would help with dependency deduping
Originally posted by @benmccann in https://github.com/carbon-design-system/sveld/issues/131#issuecomment-2347282083
Actually with Svelte 5 I think you could go even a step farther and remove svelte-preprocess altogether since Svelte 5 natively understands Typescript (I'm assuming that's what svelte-preprocess is used for here)
Noted, thank you!
Currently, this library does not support v5 (#128). For now, I'd like to continue supporting v3, v4 as best as possible. I still think it's worth to upgrade these dependencies.
EDIT: Another thought – when this library was first written for Carbon Components Svelte, it was designed with Rollup in mind (this was also the time when Sapper was still the "official" Svelte framework.
Over the years – especially with Vite/SvelteKit – I think if this library is rewritten, it should be Vite-first (and by extension, support Rollup given that most (?) APIs are the same).
I adopted a similar strategy in rewriting the carbon-preprocess-svelte plugin.
All Rollup plugins are Vite plugins, so if it works with Rollup it will work with Vite. Vite does add a few new plugin APIs on top of Rollup, but if you use them you do lose Rollup compatibility.
One thing that would be kind of nice would be to have a sveld core package that lets you analyze a single file without needing rollup/vite at all. When I've seen folks talking about sveld it's often to include as a library in something they're building in that manner