Repository navigation
Expand file tree
/
Copy pathvite.config.ts
More file actions
86 lines (84 loc) · 2.1 KB
/
Copy pathvite.config.ts
File metadata and controls
86 lines (84 loc) · 2.1 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import { fileURLToPath } from "node:url";
import { recommended } from "@effect/tsgo/oxlint-presets";
import { defineConfig } from "vite-plus";
const ignoredPaths = ["dist/**", "**/dist/**", "node_modules/**", "**/node_modules/**", ".pnpm-store/**"];
const aliases = {
"@codeworksh/aikit/modelgen": fileURLToPath(new URL("../aikit/src/modelgen.ts", import.meta.url)),
"@codeworksh/aikit/failure": fileURLToPath(new URL("../aikit/src/llm/failure.ts", import.meta.url)),
"@codeworksh/aikit": fileURLToPath(new URL("../aikit/src/index.ts", import.meta.url)),
};
export default defineConfig({
resolve: {
alias: aliases,
},
run: {
tasks: {
// tsconfig resolves aikit through its generated declarations.
typecheck: { command: "tsc --noEmit", dependsOn: ["@codeworksh/aikit#build"], cache: false },
},
},
pack: {
// Every subpath in `exports`. A plugin author imports one or two of these; the harness
// imports most of them, which is the point — both sides load the same modules.
entry: [
"src/event.ts",
"src/ids.ts",
"src/index.ts",
"src/location.ts",
"src/plugin.ts",
"src/plugin/mcp.ts",
"src/plugin/prompt.ts",
"src/plugin/section.ts",
"src/plugin/tool.ts",
"src/posix.ts",
"src/project.ts",
"src/repo.ts",
"src/sandbox.ts",
"src/sandbox/driver.ts",
"src/sandbox/errors.ts",
"src/sandbox/filesystem.ts",
"src/sandbox/instance.ts",
"src/sandbox/io.ts",
"src/sandbox/resource.ts",
"src/sandbox/shell.ts",
"src/schema.ts",
"src/settings.ts",
"src/space.ts",
"src/tool.ts",
"src/tool/error.ts",
"src/tool/progress.ts",
],
format: ["esm"],
outDir: "dist/pack",
deps: {
dts: {
neverBundle: true,
},
},
sourcemap: true,
clean: true,
dts: {
resolver: "oxc",
tsconfig: "../../tsconfig.pack.json",
},
},
test: {
include: ["test/**/*.test.ts"],
},
lint: {
...recommended,
ignorePatterns: ignoredPaths,
options: {
...recommended.options,
typeAware: true,
typeCheck: true,
},
},
fmt: {
ignorePatterns: ignoredPaths,
printWidth: 120,
useTabs: true,
tabWidth: 3,
sortPackageJson: true,
},
});