mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix: 🔥 Remove old useless post-build patches
This commit is contained in:
parent
a80234c445
commit
26dc389010
12
build.ts
12
build.ts
|
|
@ -27,18 +27,6 @@ await Bun.build({
|
||||||
|
|
||||||
buildSpinner.text = "Transforming";
|
buildSpinner.text = "Transforming";
|
||||||
|
|
||||||
// Fix for wrong Bun file resolution, replaces node_modules with ./node_modules inside all dynamic imports
|
|
||||||
// I apologize for this
|
|
||||||
await $`sed -i 's|import("node_modules/|import("./node_modules/|g' dist/*.js`;
|
|
||||||
await $`sed -i 's|import"node_modules/|import"./node_modules/|g' dist/**/*.js`;
|
|
||||||
// Replace /temp/node_modules with ./node_modules
|
|
||||||
await $`sed -i 's|/temp/node_modules|./node_modules|g' dist/**/*.js`;
|
|
||||||
// Replace 'export { toFilter, getLevelFilter, getConsoleSink };' to remove getConsoleSink
|
|
||||||
// Because Bun duplicates the export and it causes a runtime error
|
|
||||||
await $`sed -i 's|export { toFilter, getLevelFilter, getConsoleSink };|export { toFilter, getLevelFilter };|g' dist/**/*.js`;
|
|
||||||
// Delete "var list;"
|
|
||||||
await $`sed -i 's|var list;||g' dist/**/*.js`;
|
|
||||||
|
|
||||||
// Copy Drizzle migrations to dist
|
// Copy Drizzle migrations to dist
|
||||||
await $`cp -r drizzle dist/drizzle`;
|
await $`cp -r drizzle dist/drizzle`;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue