Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(spaces-web): compile the components when the dev server starts (#6437)

injaneity33db0d554751
diff --git a/apps/cua-spaces-web/vite.config.ts b/apps/cua-spaces-web/vite.config.ts
index a21c055903..f931de95d3 100644
--- a/apps/cua-spaces-web/vite.config.ts
+++ b/apps/cua-spaces-web/vite.config.ts
@@ -45,7 +45,11 @@ export default defineConfig({
// dependencies are found on first navigation and the dev server reloads the
// page mid-run (parity flows then fail with "execution context destroyed").
optimizeDeps: { entries: ["index.html", "src/**/*.{ts,tsx}", "!src/**/*.d.ts", "!src/**/__tests__/**", "!src/**/*.test.{ts,tsx}"] },
- server: { port: 5174, strictPort: true },
+ // Compile the components when the dev server starts. A code-split route's
+ // first visit otherwise transforms its components on demand (Babel's React
+ // Compiler pass), which on a busy CI runner outlasts the parity flows' 5 s
+ // waits (#6081).
+ server: { port: 5174, strictPort: true, warmup: { clientFiles: ["./src/components/**/*.tsx"] } },
preview: { port: 5174 },
// Source maps: shown in a plain build (`pnpm dev`, local checks). Release CD
// sets CUA_SOURCEMAPS=1 to emit them hidden (no sourceMappingURL comment) in