This repository was archived by the owner on Jan 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
62 lines (61 loc) · 1.55 KB
/
vite.config.ts
File metadata and controls
62 lines (61 loc) · 1.55 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
import { defineConfig } from "vite";
import monacoEditorPlugin from "vite-plugin-monaco-editor";
import { resolve } from "path";
export default defineConfig({
clearScreen: false,
root: ".",
publicDir: "public",
plugins: [
(monacoEditorPlugin as any).default({
languageWorkers: ["editorWorkerService", "css", "html", "json", "typescript"],
customWorkers: [],
}),
],
server: {
port: 5173,
strictPort: true,
watch: {
ignored: ["**/src-tauri/**", "**/vivid/**", "vivid/**"],
},
fs: {
strict: true,
allow: [".", "node_modules"],
deny: ["vivid", "vivid/**"],
},
},
build: {
rollupOptions: {
external: (id) => {
return id.includes("/vivid/") || id.includes("vivid/build");
},
},
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
optimizeDeps: {
// Only scan these specific entry points, not the whole directory tree
entries: ["index.html"],
// Exclude vivid from optimization
exclude: ["vivid"],
// Use esbuild plugin to block vivid imports
esbuildOptions: {
plugins: [
{
name: "exclude-vivid",
setup(build) {
// Mark all paths containing /vivid/ as external
build.onResolve({ filter: /vivid/ }, (args) => {
if (args.path.includes("/vivid/") || args.importer?.includes("/vivid/")) {
return { path: args.path, external: true };
}
return null;
});
},
},
],
},
},
});