-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
I use anysonhover template project from gibhub and rune for tabs. Copilot and chatGPT 4.1 create this code and they works to fix the problems.
I spend couple day to try the code working... but nothing. Chat GPT said this is Svelte rune problems. It is no ready for props() and new features.
While working with Svelte 5 runes: true (version 5.0.0-next.272), I encountered multiple critical issues that made it impossible to develop even a basic component using props and classic Svelte stores.
Svelte: 5.0.0-next.272
vite-plugin-svelte: latest
Vite: 5.x
Tailwind CSS: 4.x
// vite.config.ts
svelte({ compilerOptions: { runes: true }});
β Problems
-
props() is not exported from 'svelte'
import { props } from 'svelte'; // β TS error: no exported member
So the recommended $props() fallback is undocumented and unclear. -
Using export let throws runtime error (expected under runes: true):
Cannot useexport letin runes mode β use$props()instead -
Using $$props throws runtime error:
Cannot use$$propsin runes mode -
Using $props<{ id: string }>() causes compiler crash:
[plugin:vite-plugin-svelte] Not implemented type annotation EmptyStatementComes from esrap inside vite-plugin-svelte.
π I Tried
let { id } = $props<{ id: string }>(); β crash
let { id } = $props() as { id: string }; β still crashes
Tried pnpm add @sveltejs/runes β not published
export let and $$props both forbidden
π§ Current Workaround
The only stable solution was to disable runes:
Reproduction
by request
Logs
[plugin:vite-plugin-svelte] Not implemented type annotation EmptyStatement
C:/VSCode/bApp/src/lib/components/Tabs/TabHeader.svelte
at handle_type_annotation (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:624:10)
at Identifier (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:1107:28)
at handle (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:61:2)
at sequence (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:405:4)
at FunctionDeclaration|FunctionExpression (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:841:3)
at handle (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:61:2)
at handle_body (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:312:3)
at Program (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:1343:3)
at handle (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/handlers.js:61:2)
at print (file:///C:/VSCode/bApp/node_modules/.pnpm/[email protected]/node_modules/esrap/src/index.js:44:2System Info
System:
OS: Windows 11 10.0.26100
CPU: (4) x64 Intel(R) N100
Memory: 5.55 GB / 15.75 GB
Binaries:
Node: 24.1.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
npm: 11.4.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.12.1 - ~\AppData\Roaming\npm\pnpm.CMD
Browsers:
FF 139.0.4 (64bt)
Edge: Chromium (135.0.3179.66)Severity
annoyance