Commit aa3c761
fix(e2e): stabilize playwright against Vite dep-optimizer races (#38)
The desktop golden-path e2e intermittently failed in CI with "504
Outdated Optimize Dep" on the dynamic import of OSShell.tsx. Vite's
dep optimizer was re-bundling mid-flight as it discovered deps reached
only through lazy-loaded islands (zustand, zustand/middleware,
react-rnd), invalidating in-flight module URLs.
- astro.config.mjs: pre-bundle the offending deps via optimizeDeps.include
and warm up the island entries with server.warmup.clientFiles so
Vite's crawl completes before the first request.
- playwright.config.ts: in CI, serve the built site via astro preview —
no dev optimizer at all, closest to prod. Local dev keeps astro dev
for fast iteration.
Verified: 5/5 cold-cache runs pass in CI mode, 5/5 in local dev mode.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9f06528 commit aa3c761
2 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
15 | 32 | | |
16 | 33 | | |
17 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
0 commit comments