-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the bug
When using vitest with workspace (monorepo), server options in each vite.config.js are not working.
I just noticed whole test option is passed to ViteNodeServer as a server option. I'll give it a try to submit a PR for this issue.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-3x8m8p
This is a monorepo project that has one workspace package pkg-x which uses server.deps.inline option in its vite.config.js. -- I was copy the code from repro of #3862.
When you run vitest run on packages/pkg-x/, it pass the tests. But when you run vitest run on project's root directory, it fails because server.deps.inline option is not working.
This is not only server.deps.inline, but all server options are not working. Uncomment the server.debug.dumpModules option and run vitest run on project's root directory, dbg directory will not be created.
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.4.2 - /usr/local/bin/npm
pnpm: 8.10.0 - /usr/local/bin/pnpm
npmPackages:
@vitest/ui: ^1.0.0-beta.5 => 1.0.0-beta.5
vitest: ^1.0.0-beta.5 => 1.0.0-beta.5Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.