Skip to content

Commit

Permalink
use tsup configuration from durhack
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordfirespeed committed Oct 27, 2024
1 parent d254ded commit 287961c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions server/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
import * as path from "node:path"
import * as glob from "glob"
import { defineConfig } from "tsup"

const configFilePaths = glob.sync("src/config/*.ts")
const configFileEntryArray = configFilePaths
.filter((filePath) => !filePath.endsWith("index.ts") && !filePath.endsWith("schema.ts"))
.map((filePath) => {
return [`config/${path.parse(filePath).name}`, filePath]
})
const configFileEntries = Object.fromEntries(configFileEntryArray)

export default defineConfig([
{
entry: {
main: "src/main.ts",
...configFileEntries,
"ticket-assigner": "src/ticket-assigner/main.ts",
},
target: "esnext",
target: "node22",
format: "esm",
splitting: true,
clean: true,
minify: false,
outDir: "dist",
external: ["tsx"],
},
])

0 comments on commit 287961c

Please sign in to comment.