Vitest workspace run doesn't pick .env from individual projects #5448
Labels
feat: workspace
Issues and PRs related to the workspace feature
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
I have a monorepo with different projects in
packages/*
, when we runvitest
inside of this packages the .env.{mode} it's picked correctly, but when running in the root of the monorepo, 0 variables are caught.We have a
vitest.workspace.mts
file in the root with the following:We define the
vitest.config.ts
in the packages/ like this:Initially created as discussion here: #5446
Reproduction
stackblitz.com/edit/vitest-dev-vitest-pxuer9?file=packages%2Flib1%2F.env.test
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: