diff --git a/tools/compat-testing/playwright.config.js b/tools/compat-testing/playwright.config.js index a1106472..03d47783 100644 --- a/tools/compat-testing/playwright.config.js +++ b/tools/compat-testing/playwright.config.js @@ -74,8 +74,20 @@ export default defineConfig({ webServer: { command: 'deno task dev:vite', + // Playwright is invoked with cwd = tools/compat-testing/ (via `working-directory` + // in .github/workflows/e2e-playwright.yml). Without `cwd: '../..'`, vite starts + // with process.cwd() = tools/compat-testing/, which has no index.html and no + // public/ — Vite walks up to find vite.config.js but still treats the spawn + // directory as project root, so /assets/main/ui.webp.json 404s and + // PixiJS Loader fails during preload bundle init. + // + // Setting cwd to the repo root (two levels up from tools/compat-testing/) + // makes vite serve public/, raw-assets/, src/, index.html correctly. + cwd: '../..', port: 1984, reuseExistingServer: true, timeout: 60000, + stdout: 'pipe', + stderr: 'pipe', }, });