fix: resolve Prisma __dirname ESM error in production Docker build
Move @prisma/client and prisma to dependencies so adapter-node externalizes them instead of bundling. Add ssr.external config for Vite to prevent inlining Prisma's CJS engine loader.
This commit is contained in:
@@ -4,6 +4,10 @@ import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [tailwindcss(), sveltekit()],
|
||||
ssr: {
|
||||
noExternal: [],
|
||||
external: ['@prisma/client', '.prisma/client']
|
||||
},
|
||||
server: {
|
||||
port: 5181,
|
||||
host: '0.0.0.0'
|
||||
|
||||
Reference in New Issue
Block a user