drizzle-kit should use `peerDependencies` instead of bundling dependencies

In addition to helpdrizzle-kit overriding `process.env` before `@next/env` can load values for local development, I see that drizzle-kit has bundled a bunch of drivers into its own executable instead of using peerDependencies. This makes it impossible to override neonConfig settings so I can use a local wsproxy for local development since drizzle-kit is using an entirely separate and unexported copy of @vercel/postgres and @neondatabase/serverless.

There should either be a way to configure settings on the bundled copy @neondatabase/serverless or a way to use peerDependencies to dedupe drivers so that we can override settings on the same instance that drizzle-kit uses.
The setup I use for local work with Vercel Postgres or Neon database
GitHub
Connect to Neon PostgreSQL from serverless/worker/edge functions - neondatabase/serverless
Was this page helpful?