5777e4910e
When the user table is empty, init creates an admin via better-auth's admin.createUser API. ADMIN_USERNAME / ADMIN_EMAIL / ADMIN_PASSWORD configure it; password is generated and logged once if not provided. Also silence the cosmetic async_hooks warning by marking it external. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
36 lines
934 B
TypeScript
36 lines
934 B
TypeScript
import { paraglideVitePlugin } from '@inlang/paraglide-js';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import adapter from 'svelte-adapter-bun';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
rollupOptions: { external: ['async_hooks'] }
|
|
},
|
|
plugins: [
|
|
tailwindcss(),
|
|
sveltekit({
|
|
adapter: adapter({
|
|
precompress: true
|
|
}),
|
|
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']
|
|
}
|
|
});
|