aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-prisma-client.js
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-24 13:09:50 +0000
committerFuwn <[email protected]>2026-01-24 13:09:50 +0000
commit396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b (patch)
treeb9df4ca6a70db45cfffbae6fdd7252e20fb8e93c /scripts/build-prisma-client.js
downloadumami-396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b.tar.xz
umami-396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b.zip
Initial commitHEADmain
Created from https://vercel.com/new
Diffstat (limited to 'scripts/build-prisma-client.js')
-rw-r--r--scripts/build-prisma-client.js18
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));