When using Drizzle-Kit in something like SvelteKit, how should I handle the schema.ts?
Should I just let my entire
drizzle
folder sit inside my lib
directory?1 Reply
I'd recommend
src/lib/server
because Sveltekit will prevent you from accidentally importing anything from that folder into the client. That way, it's harder to accidentally leak your database secrets.
https://kit.svelte.dev/docs/server-only-modules#your-modulesSvelteKit docs
Server-only modules • SvelteKit documentation