mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
Fix Docker build again
This commit is contained in:
parent
ea1d7b1510
commit
257243aa0c
3 changed files with 9 additions and 3 deletions
7
build.ts
7
build.ts
|
|
@ -26,7 +26,7 @@ await Bun.build({
|
|||
target: "bun",
|
||||
splitting: true,
|
||||
minify: false,
|
||||
external: ["bullmq"],
|
||||
external: ["bullmq", "@prisma/client"],
|
||||
}).then((output) => {
|
||||
if (!output.success) {
|
||||
console.log(output.logs);
|
||||
|
|
@ -37,6 +37,11 @@ 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/client`;
|
||||
await $`cp -r ${process.cwd()}/node_modules/@prisma/client dist/node_modules/@prisma`;
|
||||
await $`cp -r ${process.cwd()}/node_modules/.prisma dist/node_modules`;
|
||||
|
||||
// Create pages directory
|
||||
// mkdir ./dist/pages
|
||||
await mkdir(`${process.cwd()}/dist/pages`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue