-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathtsdown.base.ts
More file actions
28 lines (26 loc) · 664 Bytes
/
Copy pathtsdown.base.ts
File metadata and controls
28 lines (26 loc) · 664 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 { preparePackageDist } from "./scripts/prepare-package-dist.ts";
type PackageTsdownOptions = {
packageRoot: string;
entry: Record<string, string>;
copy?: Array<{ from: string; flatten?: boolean }>;
};
export function createPackageTsdownConfig(options: PackageTsdownOptions) {
return {
clean: true,
copy: options.copy,
deps: {
skipNodeModulesBundle: true,
},
dts: true,
entry: options.entry,
fixedExtension: false,
format: "esm",
onSuccess: async () => {
await preparePackageDist(options.packageRoot);
},
outDir: "dist",
platform: "node",
target: "node22",
unbundle: true,
};
}