4821764a4f
Next.js 16 with Turbopack bundles @prisma/client into the RSC bundle, causing it to be treated as a client module and creating 'temporary client references'. This triggers the 'Cannot access toStringTag on the server' error whenever Prisma result objects are used in Server Components. Adding serverExternalPackages tells Turbopack to treat these as native Node.js packages and keep them out of the RSC bundle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 lines
253 B
TypeScript
10 lines
253 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
transpilePackages: ["unified", "remark-parse"],
|
|
serverExternalPackages: ["@prisma/client", "@prisma/adapter-pg", "pg"],
|
|
};
|
|
|
|
export default nextConfig;
|