svelte
                                
                                 svelte copied to clipboard
                                
                                    svelte copied to clipboard
                            
                            
                            
                        fix: export add snippet symbol func
Hello!
Astro uses add_snippet_symbol func: https://github.com/withastro/astro/blob/main/packages/integrations/svelte/client-v5.js#L2
When I use the latest version of Svelte 5 with Astro I get an error:
12:19:22 [ERROR] [UnhandledRejection] Astro detected an unhandled rejection. Here's the stack trace:
Error: Build failed with 1 error:
node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_type_45aq3zregi4esy5helmin3cl6q/node_modules/@astrojs/svelte/client-v5.js:2:9: ERROR: No matching export in "node_modules/.pnpm/[email protected]/node_modules/svelte/src/internal/client/index.js" for import "add_snippet_symbol"
    at failureErrorWithLog (/Users/azat/Developer/eslint-plugin-perfectionist/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1651:15)
    at /Users/azat/Developer/eslint-plugin-perfectionist/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1059:25
    at /Users/azat/Developer/eslint-plugin-perfectionist/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1527:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
This export was removed in this PR: https://github.com/sveltejs/svelte/commit/4365562228870aaa5c7d85cfd27d03d929a5f295
Please bring back the export of this feature so that you can use Svelte 5 with Astro.
Issue in Astro: https://github.com/withastro/astro/issues/11149
⚠️ No Changeset found
Latest commit: b8eda2b1bb477360c4a12013672258ef4c09aab8
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@Rich-Harris @Conduitry Hello! Could you please preview this PR? Without this, we cannot use Svelte 5 with Astro. 😢
We're aware of the issue, but this isn't the solution we plan to go with. We don't want people using private APIs as these are subject to change without warning. We have a rough design for a solution that we think would work for Astro but we haven't had a chance to test it out yet — more soon
@Rich-Harris It's cool, and it's the right thing to do. Thanks for the explanation. But maybe we should still merge the current PR as a temporary solution? Currently, Astro can't use Svelte 5 at all.
@Rich-Harris My suggestion:
- merge this pull request and give the option to use Svelte 5 with Astro
- create an issue in Svelte repo about this problem with private API usage
- specify this pull request in Svelte's new issue as the one to be reverted in future
This is a critical issue. Unfortunately, this problem makes it impossible to release our project.
Currently Astro cannot use Svelte 5 at all. Please give us a temporary solution to the problem. 🙏
As a temporary workaround an older version works with Astro... npm install --save-dev [email protected]
@nzoschke I need one fix that came in v5.0.0-next.153. Unfortunately, your suggestion doesn't suit me at all.
cc @bluwy i'm not sure if the integration was ever working with Svelte 5 or not. If so can we revert using this symbol?
cc @bluwy i'm not sure if the integration was ever working with Svelte 5 or not. If so can we revert using this symbol?
I am working on a project using Astro and svelte integration. It works with svelte 5 but breaks after v5.0.0-next.133. I have also been waiting for this to be fixed.
Broken for me as well. I'm currently using the latest version 5.0.0-next.166.
Can stealing the symbol be a temporary solution?
Closing this in favour of https://github.com/sveltejs/svelte/pull/12409.