mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
chore(setup): enforce svelte 5 runes mode globally
This commit is contained in:
parent
468542babd
commit
4aa0647224
2 changed files with 7 additions and 16 deletions
|
|
@ -1,23 +1,22 @@
|
|||
import { vitePreprocess, type SvelteConfig } from '@sveltejs/vite-plugin-svelte';
|
||||
import { vitePreprocess, type SvelteConfig } from "@sveltejs/vite-plugin-svelte";
|
||||
|
||||
const config: SvelteConfig = {
|
||||
preprocess: vitePreprocess(),
|
||||
compilerOptions: {
|
||||
// TODO: Enforce runes mode on all files once Inertia v3 https://github.com/inertiajs/inertia/tree/3.x is released
|
||||
// runes: true,
|
||||
runes: true,
|
||||
discloseVersion: false,
|
||||
modernAst: true,
|
||||
dev: true,
|
||||
experimental: {
|
||||
async: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
vitePlugin: {
|
||||
inspector: {
|
||||
showToggleButton: 'always',
|
||||
toggleButtonPos: 'top-right'
|
||||
}
|
||||
}
|
||||
showToggleButton: "always",
|
||||
toggleButtonPos: "top-right",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
|
|
|||
|
|
@ -13,14 +13,6 @@ export default defineConfig({
|
|||
inertia(),
|
||||
svelte({
|
||||
configFile: 'svelte.config.ts',
|
||||
// TODO: Remove once Inertia v3 https://github.com/inertiajs/inertia/tree/3.x is released and runes=true is set in svelte.config.ts
|
||||
dynamicCompileOptions({ filename, compileOptions }) {
|
||||
// Enforce runes mode for all files not in node_modules
|
||||
if (!/[\\/]node_modules[\\/]/.test(filename) && !compileOptions.runes) {
|
||||
return { runes: true };
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}),
|
||||
tailwindcss(),
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue