Isolate CI database journey and stabilize E2E dependency cache
This commit is contained in:
1 parent
82bf015283
commit
bbd629dcf8
3 files changed
+45
-4
No files matched your search
@@ -4,6 +4,15 @@ import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
// Keep Vitest's dependency cache separate from the browser test server.
|
||||
cacheDir: process.env.VITE_E2E === '1' ? 'node_modules/.vite-e2e' : undefined,
|
||||
optimizeDeps: process.env.VITE_E2E === '1' ? {
|
||||
// Lazy routes and workers must be scanned before browsers cache React chunks.
|
||||
// Late discovery otherwise mixes cached and newly optimized React instances
|
||||
// across full document navigations when HMR is disabled.
|
||||
entries: ['index.html', 'src/**/*.{ts,tsx}', '!src/**/*.test.{ts,tsx}', '!src/**/*.d.ts', '!src/test/**'],
|
||||
include: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime', 'react/jsx-dev-runtime'],
|
||||
} : undefined,
|
||||
build: {
|
||||
target: 'es2022',
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user