-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
28 lines (27 loc) · 811 Bytes
/
tsdown.config.ts
File metadata and controls
28 lines (27 loc) · 811 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
import {nodeLib} from "tsdown-config-silverwind";
import {defineConfig} from "tsdown";
import {basename} from "node:path";
export default defineConfig([
nodeLib({
url: import.meta.url,
entry: ["index.ts", "api.ts"],
minify: true,
dts: false,
outputOptions: {
codeSplitting: true,
chunkFileNames: "[name].js",
// Entry plus lazily-imported chunks (dns/renovate) stay out of the
// hot-path shared chunk so startup doesn't pay their cost.
manualChunks: (id: string) => {
if (["index.ts", "dns.ts", "renovate.ts"].includes(basename(id))) return undefined;
return "shared";
},
},
}),
nodeLib({
url: import.meta.url,
entry: ["api.ts"],
clean: false,
dts: {entry: ["api.ts"], emitDtsOnly: true, tsgo: true},
}),
]);