2026-06-22 17:47:16 +02:00
|
|
|
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
|
|
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
|
import tailwindcss from '@tailwindcss/vite';
|
2026-06-24 12:34:14 +02:00
|
|
|
import adapter from 'svelte-adapter-bun';
|
2026-06-22 17:47:16 +02:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
2026-06-26 13:48:27 +02:00
|
|
|
build: {
|
|
|
|
|
rollupOptions: { external: ['async_hooks'] }
|
|
|
|
|
},
|
2026-06-22 17:47:16 +02:00
|
|
|
plugins: [
|
|
|
|
|
tailwindcss(),
|
|
|
|
|
sveltekit({
|
2026-06-26 09:37:33 +02:00
|
|
|
adapter: adapter({
|
2026-06-26 13:48:27 +02:00
|
|
|
precompress: true
|
2026-06-26 09:37:33 +02:00
|
|
|
}),
|
2026-06-22 17:47:16 +02:00
|
|
|
compilerOptions: {
|
|
|
|
|
experimental: { async: true },
|
|
|
|
|
runes: ({ filename }) =>
|
|
|
|
|
filename.split(/[/\\]/).includes('node_modules') ? undefined : true
|
|
|
|
|
},
|
|
|
|
|
experimental: { remoteFunctions: true },
|
|
|
|
|
typescript: {
|
|
|
|
|
config: (config) => ({
|
|
|
|
|
...config,
|
|
|
|
|
include: [...config.include, '../drizzle.config.ts']
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
paraglideVitePlugin({ outdir: './src/lib/paraglide', project: './project.inlang' })
|
|
|
|
|
],
|
|
|
|
|
server: {
|
|
|
|
|
allowedHosts: [process.env.ALLOWED_HOST || 'localhost:5173']
|
|
|
|
|
}
|
|
|
|
|
});
|