-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 5: Forcing runes mode causes issues with generated code. #11022
Comments
I think it is the expected behavior. You ask the compiler to enforce runes syntax at the project level. Doing that, you are not allowed to use svelte 4 reactivity syntax
|
It's not the user code causing the problem and SvelteKit being a first-party framework probably should be able to take that flag into account. If it causes an unreasonable amount of work to generate code in one format or the other (depending on flag), SvelteKit could at least throw an error that explains the situation, guiding the user. Generated <!-- This file is generated by @sveltejs/kit — do not edit it! -->
<script>
import { setContext, afterUpdate, onMount, tick } from 'svelte';
import { browser } from '$app/environment';
// stores
export let stores;
export let page;
export let constructors;
export let components = [];
export let form;
export let data_0 = null;
export let data_1 = null;
... |
Describe the bug
Setting
compilerOptions: { runes: true }
causes errors like this:Found by Swarleys on Discord.
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-alrzrc?file=svelte.config.js
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: