Add compiler options in svelte.config.js to manage runes for external dependencies
This commit is contained in:
@@ -4,6 +4,16 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
preprocess: vitePreprocess(),
|
||||
compilerOptions: (id) => {
|
||||
if (id && id.includes('node_modules')) {
|
||||
return {
|
||||
runes: false, // Disable runes for external dependencies that might not support it yet (lucide-svelte)
|
||||
};
|
||||
}
|
||||
return {
|
||||
runes: true,
|
||||
};
|
||||
},
|
||||
|
||||
kit: {
|
||||
adapter: adapter({
|
||||
|
||||
Reference in New Issue
Block a user