-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathvite.config.ts
More file actions
56 lines (55 loc) · 1.16 KB
/
vite.config.ts
File metadata and controls
56 lines (55 loc) · 1.16 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
import { defineConfig } from "vite";
import { resolve } from "path";
export default defineConfig(({ command }) => ({
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: "DevToMCP",
fileName: "index",
formats: ["es"],
},
rollupOptions: {
external: [
"@modelcontextprotocol/sdk",
"@modelcontextprotocol/sdk/server/mcp.js",
"@modelcontextprotocol/sdk/server/streamableHttp.js",
"@modelcontextprotocol/sdk/types.js",
"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: "node22",
outDir: "dist",
emptyOutDir: true,
ssr: true,
},
resolve: {
alias: {
"@": resolve(__dirname, "src"),
},
},
ssr: {
external: ["@modelcontextprotocol/sdk", "express", "zod"],
},
}));