Fix migrate.mjs: externalize drizzle-orm and postgres from Next.js bundle

Next.js bundles all non-externalized server packages into server chunks.
drizzle-orm and postgres were bundled, so they were absent from the
standalone node_modules/ and unavailable to migrate.mjs at startup.
Adding them to serverExternalPackages keeps them as separate modules and
tells the standalone tracer to include them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ginnoir
2026-05-06 19:15:00 -05:00
co-authored by Claude Sonnet 4.6
parent 524efac05f
commit 39fcd54f0c
+1 -1
View File
@@ -178,7 +178,7 @@ const nextConfig: NextConfig = {
output: "standalone",
// Keep pino and pino-pretty as native Node.js requires so their worker-thread
// transport and stream internals work correctly inside the standalone bundle.
serverExternalPackages: ["pino", "pino-pretty"],
serverExternalPackages: ["pino", "pino-pretty", "drizzle-orm", "postgres"],
};
export default nextConfig;