-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtsup.config.ts
31 lines (29 loc) · 862 Bytes
/
tsup.config.ts
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
import { defineConfig } from "tsup";
// __filename and __dirname shims
// - https://github.com/egoist/tsup/search?q=__filename
export default defineConfig(async (options) => {
return {
...options,
clean: true,
dts: false,
entry: [
"src/integration/index.ts",
"src/edge-runtime/index.ts",
"src/middleware/index.ts",
],
format: ["esm", "cjs"],
// FUTURE: incremental builds when implemented https://github.com/egoist/tsup/issues/615
// incremental: !options.watch,
keepNames: true,
minifyIdentifiers: false,
minifySyntax: !options.watch,
minifyWhitespace: !options.watch,
onSuccess:
"tsc --emitDeclarationOnly --declaration --declarationMap --declarationDir ./dist",
outDir: "dist",
shims: true,
silent: !options.watch,
sourcemap: true,
splitting: false,
};
});