storybookjs / addon-svelte-csf

[Incubation] CSF using Svelte components.
MIT License
98 stars 29 forks source link

Update versions of peer dependencies to allow latest Vite and Vite Svelte plugin #159

Closed joekrump closed 6 months ago

joekrump commented 7 months ago

Fixes https://github.com/storybookjs/addon-svelte-csf/issues/161

Now that Vite 5 has been released, it would be nice to have te versions of the peer dependencies for it and the Svelte Vite plugin which uses Vite, updated to the latest versions. If this could be published as a new release that would most awesome!

j3rem1e commented 7 months ago

I don't think it's a good idea to drop support for vite4 now

joekrump commented 7 months ago

I don't think it's a good idea to drop support for vite4 now

@j3rem1e are you able to say a little more about the thinking behind that?

I agree that vite 4 should still be supported since it is widely used. To do this and support vite 5, a new major release of this package could be made that supports vite >=5 while still doing minor release bumps for the current major version that requires vite <= 4. Curious to hear your thoughts on that path forward.

matths commented 6 months ago

Any news here? It's two weeks and I would appreciate this addon working with Vite5.

JReinhold commented 6 months ago

If someone is willing to test this addon in a Vite 5 project and can confirm it works fine, I'd be happy to merge and release this.

matths commented 6 months ago

If someone is willing to test this addon in a Vite 5 project and can confirm it works fine, I'd be happy to merge and release this.

@JReinhold We would need a package to include to test it with our Svelte project. Any advice how to come up with that?

Masstronaut commented 6 months ago

@matths could you use the existing release and update the package.json as is done in this PR? It's a 2 line change.

Masstronaut commented 6 months ago

I tested this in a new sveltekit project per the sveltekit docs:

npm create svelte@latest my-app
cd my-app
npm install

and in my package.json "devDependencies" have:

"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"vite": "^5.0.3",
"svelte": "^4.2.7",
...

I then ran npx storybook init and npm i -D @storybook/addon-svelte-csf --force and can confirm that storybook seemed to be working fine with no issues. Will report back when I have a chance to test it on a larger project.

shilman commented 6 months ago

:rocket: PR was released in v4.1.0 :rocket: