Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[svelte-loader] Support Svelte 5 #2242

Closed
bhark opened this issue Dec 2, 2024 · 1 comment
Closed

[svelte-loader] Support Svelte 5 #2242

bhark opened this issue Dec 2, 2024 · 1 comment

Comments

@bhark
Copy link

bhark commented Dec 2, 2024

Is your feature request related to a problem? Please describe.
Svelte 5 is (mostly) backwards compatible, and as such I imagine extending support shouldn't be a major issue. At the moment, I have not been able to implement visual editing with a simple Svelte 5 application using @sanity/svelte-loader. I haven't attempted a setup without svelte-loader.

Describe the solution you'd like
I'd like to be able to follow the integration guide and end up with a working visual editing tool.

Describe alternatives you've considered
Installing with --legacy-peer-deps. I end up having to install react, and the implementation is too broken to work around. I end up with errors such as:

Error: Build failed with 2 errors: node_modules/@sanity/visual-editing/dist/_chunks-es/PointerEvents.js:1:528: ERROR: Could not resolve "react-dom" node_modules/@sanity/visual-editing/dist/_chunks-es/renderVisualEditing.js:1:102: ERROR: Could not resolve "react-dom/client"

Additional context
Svelte 5 has been the go-to production version for some time now. It would be fitting to support it, and update the docs to go along with the new support.

@rdunk
Copy link
Member

rdunk commented Dec 2, 2024

Closing as dupe of #2075.

I believe we plan on adding support soon, but as far as I'm aware Svelte 5 has only been stable for about a month or so.

Just as a point of clarification, React will stay as a dependency as it is used to render overlays regardless of the framework implementation.

@rdunk rdunk closed this as completed Dec 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants