Vitest workspace run doesn't pick .env from individual projects #5446
-
|
I have a monorepo with different projects in We have a export default ["packages/*", "apps/*"];We define the import tsconfigPaths from "vite-tsconfig-paths";
import { defineProject } from "vitest/config";
export default defineProject({
envPrefix: ["SHERPAS_", "DATABASE_", "FLY_", "PRIMARY_"],
plugins: [
tsconfigPaths({
root: "../..",
}),
],
test: {
hookTimeout: 20_000,
exclude: [
"node_modules",
"dist",
".idea",
".git",
".cache",
"src/tests/**/*.{ts,tsx}",
],
environment: "jsdom",
},
});What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Answered by
sheremet-va
Mar 28, 2024
Replies: 1 comment 6 replies
-
|
Can you provide more code? What is the directory structure? Maybe you can use this as an example? https://stackblitz.com/edit/vitest-dev-vitest-emzcxj?initialPath=__vitest__/ |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you. Can confirm that it is a bug