Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tricky-boxes-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"sv": patch
---

fix: default to rune mode
2 changes: 1 addition & 1 deletion packages/sv/src/addons/tests/drizzle/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function insertTask(value) {

export const pageComp = `
<script>
export let data;
let { data } = $props();
</script>

{#each data.tasks as task}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config = {
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
},
vitePlugin: {
dynamicCompileOptions: ({ filename }) => ({ runes: !filename.includes('node_modules') })

@JReinhold JReinhold Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is 100% correct. Right now this is saying:

"Enable runes-mode across all project files, but explicitly disable it for all files in node_modules, even those using runes".

I think it should be undefined in the node_modules case to go back to the auto-infer mode

Suggested change
dynamicCompileOptions: ({ filename }) => ({ runes: !filename.includes('node_modules') })
dynamicCompileOptions: ({ filename }) => ({ runes: filename.includes('node_modules') }) ? undefined : true

The newest release of sv is causing our CI to fail in Storybook for this exact reason, because we're using runes in @storybook/svelte and all the other packages. When I change the project's config to the above suggestion, it works fine.

}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import adapter from '@sveltejs/adapter-node';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: { adapter: adapter() },
vitePlugin: {
dynamicCompileOptions: ({ filename }) => ({ runes: !filename.includes('node_modules') })
},
preprocess: [mdsvex()],
extensions: ['.svelte', '.svx']
};
Expand Down
3 changes: 3 additions & 0 deletions packages/sv/src/create/shared/+typescript/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config = {
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
},
vitePlugin: {
dynamicCompileOptions: ({ filename }) => ({ runes: !filename.includes('node_modules') })
}
};

Expand Down
3 changes: 3 additions & 0 deletions packages/sv/src/create/shared/-typescript/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config = {
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
},
vitePlugin: {
dynamicCompileOptions: ({ filename }) => ({ runes: !filename.includes('node_modules') })
}
};

Expand Down
Loading