Skip to content

Commit 04af0a1

Browse files
hackall360claude
andcommitted
fix: use cross-platform environment variable syntax in Playwright config
Changed from command-line env var (doesn't work on Windows) to Playwright's built-in env option which works on all platforms. - Removed PLAYWRIGHT_SERVE_DIR=dist prefix from command - Added env option to webServer config with PLAYWRIGHT_SERVE_DIR: 'dist' This ensures tests work reliably on Windows, macOS, and Linux. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b58f077 commit 04af0a1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

playwright.config.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ export default defineConfig({
1313
viewport: { width: 1280, height: 720 }
1414
},
1515
webServer: {
16-
command: 'PLAYWRIGHT_SERVE_DIR=dist node playwright-server.mjs',
16+
command: 'node playwright-server.mjs',
1717
port: 4173,
1818
reuseExistingServer: !process.env.CI,
19-
timeout: 120_000
19+
timeout: 120_000,
20+
env: {
21+
PLAYWRIGHT_SERVE_DIR: 'dist'
22+
}
2023
},
2124
reporter: [
2225
['junit', { outputFile: 'playwright-report/results.xml' }],

0 commit comments

Comments
 (0)