2025-05-01 04:38:43 -07:00
|
|
|
import esbuild from 'esbuild';
|
|
|
|
|
|
|
|
|
|
esbuild
|
|
|
|
|
.build({
|
2025-08-15 12:29:33 -07:00
|
|
|
entryPoints: ['src/generated/prisma/client.ts'], // Adjust this to your entry file
|
2025-05-01 04:38:43 -07:00
|
|
|
bundle: true, // Bundle all files into one (optional)
|
2025-09-01 15:59:06 -07:00
|
|
|
outfile: 'generated/prisma/client.js', // Output file
|
2025-05-01 04:38:43 -07:00
|
|
|
platform: 'node', // For Node.js compatibility
|
|
|
|
|
target: 'es2020', // Target version of Node.js
|
|
|
|
|
format: 'esm', // Use ESM format
|
|
|
|
|
sourcemap: true, // Optional: generates source maps for debugging
|
2025-08-15 12:29:33 -07:00
|
|
|
external: [
|
|
|
|
|
'../src/generated/prisma', // exclude generated client
|
|
|
|
|
'@prisma/client', // just in case
|
|
|
|
|
'.prisma/client',
|
|
|
|
|
], // Optional: Exclude external dependencies from bundling
|
2025-05-01 04:38:43 -07:00
|
|
|
})
|
|
|
|
|
.catch(() => process.exit(1));
|