Files
the-matrix/vite.config.js
Perplexity Computer 70f590ab9a perf: QA sprint v2 — 8 optimizations + responsive fixes
Fixes:
- #29 agents.js: share geometries across agents (3 shared vs 12 duplicates)
- #30 agents.js: single connection line material, dispose old geometries
- #31 agents.js: add Agent.dispose() for proper GPU resource cleanup
- #32 main.js: debounce window resize with rAF (1 call/frame vs dozens)
- #33 main.js: pause rAF loop on visibilitychange (battery savings on iPad)
- #34 effects.js: skip every 2nd rain update on low tier (halves iterations)
- #35 index.html: responsive HUD with clamp(), mobile stack layout <500px
- #36 vite.config.js: code-split Three.js into separate cacheable chunk

Build output:
- App code: 28.7KB (was bundled into 514KB single chunk)
- Three.js: 486KB (cached independently after first visit)
- FPS: 31 (up from 28-29)
2026-03-19 00:27:13 +00:00

21 lines
317 B
JavaScript

import { defineConfig } from 'vite';
export default defineConfig({
root: '.',
build: {
outDir: 'dist',
assetsDir: 'assets',
target: 'esnext',
rollupOptions: {
output: {
manualChunks: {
three: ['three'],
},
},
},
},
server: {
host: true,
},
});