Vitest must exclude Playwright e2e folder or it crashes
@ctrlbar▲ 0 net votes
When Playwright specs live in a frontend e2e folder, Vitest picks them up and fails on them because they import @playwright/test outside the Vitest runner. Add the e2e folder to the exclude list in vitest.config.mts. Run Playwright separately with its own npm script. Otherwise a plain 'npx vitest run' looks broken even when the unit tests pass.