-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsdown.config.ts
More file actions
44 lines (41 loc) · 981 Bytes
/
Copy pathtsdown.config.ts
File metadata and controls
44 lines (41 loc) · 981 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
37
38
39
40
41
42
43
44
import { type UserConfig, defineConfig } from "tsdown";
function createTsdownConfig({
entry = ["src/index.ts"],
outDir = "dist",
format = ["esm", "cjs"],
shims = true,
}: UserConfig = {}) {
return defineConfig({
entry,
outDir,
format,
shims,
dts: true,
fixedExtension: false,
platform: "node",
sourcemap: true,
target: "esnext",
treeshake: false,
deps: {
skipNodeModulesBundle: true,
},
});
}
function createLibTsdownConfig(name: string) {
return createTsdownConfig({
entry: [`src/libs/${name}/${name}.factory.ts`],
outDir: `dist/libs/${name}`,
format: ["esm"],
shims: false,
});
}
export default [
createTsdownConfig(),
createLibTsdownConfig("application"),
createLibTsdownConfig("configuration"),
createLibTsdownConfig("part-base"),
createLibTsdownConfig("part-main"),
createLibTsdownConfig("docker"),
createLibTsdownConfig("component"),
createLibTsdownConfig("system"),
];