diff options
| author | Fuwn <[email protected]> | 2026-01-24 13:09:50 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-24 13:09:50 +0000 |
| commit | 396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b (patch) | |
| tree | b9df4ca6a70db45cfffbae6fdd7252e20fb8e93c /scripts/build-prisma-client.js | |
| download | umami-main.tar.xz umami-main.zip | |
Created from https://vercel.com/new
Diffstat (limited to 'scripts/build-prisma-client.js')
| -rw-r--r-- | scripts/build-prisma-client.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/build-prisma-client.js b/scripts/build-prisma-client.js new file mode 100644 index 0000000..b5edc3d --- /dev/null +++ b/scripts/build-prisma-client.js @@ -0,0 +1,18 @@ +import esbuild from 'esbuild'; + +esbuild + .build({ + entryPoints: ['src/generated/prisma/client.ts'], // Adjust this to your entry file + bundle: true, // Bundle all files into one (optional) + outfile: 'generated/prisma/client.js', // Output file + 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 + external: [ + '../src/generated/prisma', // exclude generated client + '@prisma/client', // just in case + '.prisma/client', + ], // Optional: Exclude external dependencies from bundling + }) + .catch(() => process.exit(1)); |