From 2e48e126dae42e3d0e44a3a41dfa5983d7fd7004 Mon Sep 17 00:00:00 2001 From: bwmp Date: Fri, 4 Sep 2026 17:03:33 +0000 Subject: [PATCH] Fix template app production E2E environment --- templates/app/playwright.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/app/playwright.config.ts b/templates/app/playwright.config.ts index 889c78b..2a5c257 100644 --- a/templates/app/playwright.config.ts +++ b/templates/app/playwright.config.ts @@ -19,6 +19,14 @@ export default defineConfig({ // failures harder to read, and this is closer to what ships. webServer: { command: `pnpm build && pnpm preview --port ${PORT} --strictPort`, + // The suite owns this production build, so give it an explicit mock-only + // environment instead of relying on a developer's untracked `.env` file. + // Regular production builds still require their deployment configuration. + env: { + VITE_API_URL: 'http://api.invalid', + VITE_API_MOCK: 'true', + VITE_APP_NAME: 'Stack App E2E', + }, url: baseURL, reuseExistingServer: !process.env.CI, timeout: 120_000,