-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsup.config.ts
More file actions
36 lines (35 loc) · 748 Bytes
/
Copy pathtsup.config.ts
File metadata and controls
36 lines (35 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { defineConfig } from "tsup";
export default defineConfig([
// Main application bundle (optimized)
{
entry: ["./src/server.ts"],
format: ["esm"],
target: "es2022",
splitting: true,
sourcemap: false,
clean: true,
bundle: true,
minify: true,
treeshake: true,
outDir: "dist",
outExtension: () => ({ js: ".js" }),
define: { "process.env.NODE_ENV": "'production'" },
external: ["sharp"],
esbuildOptions(options) {
options.keepNames = false;
}
},
// Drizzle config (separate)
{
entry: ["drizzle.config.ts"],
format: ["esm"],
target: "es2022",
splitting: false,
sourcemap: false,
clean: false,
bundle: false,
outDir: "dist",
outExtension: () => ({ js: ".js" }),
external: ["sharp"]
}
]);