Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Scan only the project's pages in the dev server

Nguyen Xuan Ana0da7d12aa46
diff --git a/changes/vite-scan.md b/changes/vite-scan.md
new file mode 100644
index 00000000..8e9e161e
--- /dev/null
+++ b/changes/vite-scan.md
@@ -0,0 +1 @@
+- The dev server scans only the project's own pages for dependencies and does not watch `.claude/`. With a few hundred agent worktrees there, the first page load went from 13 s to 1.2 s, and the runtime benchmark no longer times out opening its harness.
diff --git a/vite.config.js b/vite.config.js
index 7b706cf0..2439bc44 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -6,7 +6,9 @@ const headers = {
};
export default defineConfig({
- server: { headers },
+ server: { headers, watch: { ignored: ['**/.claude/**'] } },
+ // Scan only the project's own pages. Agent worktrees under .claude hold hundreds of copies of them and made the first page load take 13 s.
+ optimizeDeps: { entries: ['*.html', 'bench/**/*.html'] },
preview: { headers },
build: {
rolldownOptions: {