Mixing browser and non-browser projects in vitest workspace causes error #5734
Labels
feat: browser
Issues and PRs related to the browser runner
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
I have encountered a bug in vite/vitest that occurs when I have a
vitest.workspace.ts
that references at least twovitest.config.ts
project files that use the node environment and onevitest.config.ts
project file that executes tests in a browser.When I run vitest I get the following error:
I debugged a little and the issue seems to occur in
runOptimizeDeps
. The build outputs have relative paths instead of normalized paths. When I remove the project that has browser tests in it, then the outputs inrunOptimizeDeps
have normalized paths relative to the root of the project. They don't contain any..
paths.Reproduction
I have managed to create a minimal project that demonstrates the problem. It is available here: https://github.com/cuberoot/vitest-race-issue
System Info
The text was updated successfully, but these errors were encountered: