-
Notifications
You must be signed in to change notification settings - Fork 369
Expand file tree
/
Copy pathvite.config.ts
More file actions
39 lines (36 loc) · 1.22 KB
/
vite.config.ts
File metadata and controls
39 lines (36 loc) · 1.22 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
import path from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { viteSingleFile } from "vite-plugin-singlefile";
const isDevelopment = process.env.NODE_ENV === "development";
export default defineConfig({
plugins: [react(), viteSingleFile()],
build: {
sourcemap: isDevelopment ? "inline" : undefined,
cssMinify: !isDevelopment,
minify: !isDevelopment,
rollupOptions: {
input: path.resolve(__dirname, "src/mcp-app.html"),
external: [
"react",
"react-dom",
"react-dom/client",
"react/jsx-runtime",
"@excalidraw/excalidraw",
"morphdom",
],
output: {
paths: {
"react": "https://esm.sh/react@19.0.0",
"react-dom": "https://esm.sh/react-dom@19.0.0?deps=react@19.0.0",
"react-dom/client": "https://esm.sh/react-dom@19.0.0/client?deps=react@19.0.0",
"react/jsx-runtime": "https://esm.sh/react@19.0.0/jsx-runtime",
"@excalidraw/excalidraw": "https://esm.sh/@excalidraw/excalidraw@0.18.0?deps=react@19.0.0,react-dom@19.0.0",
"morphdom": "https://esm.sh/morphdom@2.7.8",
},
},
},
outDir: "dist",
emptyOutDir: false,
},
});