mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
refactor(build): 🎨 Make build routes automatically scanned rather than manually added
This commit is contained in:
parent
87d4473276
commit
59455f9ece
2 changed files with 17 additions and 110 deletions
4
build.ts
4
build.ts
|
|
@ -1,6 +1,6 @@
|
|||
// Delete dist directory
|
||||
import { $ } from "bun";
|
||||
import { rawRoutes } from "~routes";
|
||||
import { routes } from "~routes";
|
||||
|
||||
console.log(`Building at ${process.cwd()}`);
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ await Bun.build({
|
|||
`${process.cwd()}/index.ts`,
|
||||
`${process.cwd()}/cli.ts`,
|
||||
// Force Bun to include endpoints
|
||||
...Object.values(rawRoutes),
|
||||
...Object.values(routes),
|
||||
],
|
||||
outdir: `${process.cwd()}/dist`,
|
||||
target: "bun",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue