mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
Remove Prisma once and for all
This commit is contained in:
parent
90d522eaa3
commit
a65249b79d
18 changed files with 112 additions and 563 deletions
11
build.ts
11
build.ts
|
|
@ -13,7 +13,6 @@ await $`rm -rf dist && mkdir dist`;
|
|||
await Bun.build({
|
||||
entrypoints: [
|
||||
`${process.cwd()}/index.ts`,
|
||||
`${process.cwd()}/prisma.ts`,
|
||||
`${process.cwd()}/cli.ts`,
|
||||
// Force Bun to include endpoints
|
||||
...Object.values(rawRoutes),
|
||||
|
|
@ -22,7 +21,7 @@ await Bun.build({
|
|||
target: "bun",
|
||||
splitting: true,
|
||||
minify: true,
|
||||
external: ["bullmq", "@prisma/client", "frontend"],
|
||||
external: ["bullmq", "frontend"],
|
||||
}).then((output) => {
|
||||
if (!output.success) {
|
||||
console.log(output.logs);
|
||||
|
|
@ -33,14 +32,6 @@ await Bun.build({
|
|||
// I apologize for this
|
||||
await $`sed -i 's|import("node_modules/|import("./node_modules/|g' dist/*.js`;
|
||||
|
||||
// Copy generated Prisma client to dist
|
||||
await $`mkdir -p dist/node_modules/@prisma`;
|
||||
await $`cp -r ${process.cwd()}/node_modules/@prisma dist/node_modules/`;
|
||||
await $`cp -r ${process.cwd()}/node_modules/.prisma dist/node_modules`;
|
||||
await $`mkdir -p dist/node_modules/.bin`;
|
||||
await $`cp -r ${process.cwd()}/node_modules/.bin/prisma dist/node_modules/.bin`;
|
||||
await $`cp -r ${process.cwd()}/node_modules/prisma dist/node_modules/`;
|
||||
|
||||
// Copy Sharp to dist
|
||||
await $`mkdir -p dist/node_modules/@img`;
|
||||
await $`cp -r node_modules/@img/sharp-libvips-linux-* dist/node_modules/@img`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue