-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathvite.config.ts
More file actions
55 lines (54 loc) · 1.11 KB
/
Copy pathvite.config.ts
File metadata and controls
55 lines (54 loc) · 1.11 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
import { defineConfig } from "vite";
import { resolve } from "path";
export default defineConfig(({ command }) => ({
// Build configuration
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "MCPTypescriptTemplate",
fileName: "index",
formats: ["es"],
},
rolldownOptions: {
external: [
"@modelcontextprotocol/server",
"@modelcontextprotocol/node",
"express",
"zod",
"node:crypto",
"node:http",
"node:path",
"node:fs",
"node:url",
"node:buffer",
"node:stream",
"node:events",
"node:util",
"crypto",
"http",
"path",
"fs",
"url",
"buffer",
"stream",
"events",
"util",
],
output: {
format: "es",
},
},
target: "node24",
outDir: "dist",
emptyOutDir: true,
ssr: true,
},
resolve: {
alias: {
"@": resolve(__dirname, "src"),
},
},
ssr: {
external: ["@modelcontextprotocol/server", "@modelcontextprotocol/node", "express", "zod"],
},
}));