mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 00:18:19 +01:00
20 lines
470 B
TypeScript
20 lines
470 B
TypeScript
|
|
import { $, build } from "bun";
|
||
|
|
import manifest from "./package.json" with { type: "json" };
|
||
|
|
|
||
|
|
console.log("Building...");
|
||
|
|
|
||
|
|
await $`rm -rf dist && mkdir dist`;
|
||
|
|
|
||
|
|
await build({
|
||
|
|
entrypoints: Object.values(manifest.exports).map((entry) => entry.import),
|
||
|
|
outdir: "dist",
|
||
|
|
target: "bun",
|
||
|
|
splitting: true,
|
||
|
|
minify: true,
|
||
|
|
external: [
|
||
|
|
...Object.keys(manifest.dependencies).filter((dep) =>
|
||
|
|
dep.startsWith("@versia"),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
});
|