Closed as not planned
Description
The latest version of rollup-plugin-svelte currently does not recognize the $bindable rune for svelte 5.
Repro steps:
In any .svelte file:
<script lang="ts>
let { someVar = $bindable(false) } = $props();
</script>
Rollup config:
const ssrConfig = {
input: ssrInputs,
output: {
format: 'esm',
dir: serverBundle,
entryFileNames: '[name].js'
},
plugins: [
css({ output: 'bundle.css' }),
svelte({
compilerOptions: {
dev: false,
immutable: true,
generate: 'server',
hydratable: true,
},
preprocess: sveltePreprocess()
}),
resolve({
dedupe: ['svelte']
})
]
}
This is the config I'm using to compile my .svelte files into .js files rendered on the server.
Error:
[!] (plugin svelte) CompileError: $bindable is an illegal variable name. To reference a global variable called $bindable, use globalThis.$bindable
Dependencies:
"rollup-plugin-svelte": "^7.2.2",
"svelte": "^5.0.0-next.1",
"svelte-preprocess": "^5.1.4",
Metadata
Metadata
Assignees
Labels
No labels