-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.config.ts
More file actions
61 lines (60 loc) · 1.21 KB
/
build.config.ts
File metadata and controls
61 lines (60 loc) · 1.21 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import path from "node:path";
import { defineBuildConfig } from "unbuild";
export default defineBuildConfig({
entries: [
{ input: "src/cli/index", name: "cli" },
{ input: "src/api", name: "api" },
{ input: "src/cache/lock", name: "lock" },
{
builder: "mkdist",
input: "./src",
outDir: "./dist/esm",
},
],
declaration: true,
clean: true,
sourcemap: true,
rollup: {
emitCJS: false,
alias: {
entries: [
{
find: /^#cache\/(.*)$/,
replacement: path.resolve("src/cache/$1"),
},
{
find: /^#cli\/(.*)$/,
replacement: path.resolve("src/cli/$1"),
},
{
find: /^#commands\/(.*)$/,
replacement: path.resolve("src/commands/$1"),
},
{
find: /^#config\/(.*)$/,
replacement: path.resolve("src/config/$1"),
},
{
find: "#config",
replacement: path.resolve("src/config/index"),
},
{
find: /^#core\/(.*)$/,
replacement: path.resolve("src/$1"),
},
{
find: /^#git\/(.*)$/,
replacement: path.resolve("src/git/$1"),
},
{
find: /^#types\/(.*)$/,
replacement: path.resolve("src/types/$1"),
},
],
},
inlineDependencies: ["picocolors"],
esbuild: {
minify: true,
},
},
});