-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pr welcome
Description
Describe the bug
I'm trying to configure a monorepo workspace project from the root with all config in vitest.workspace.ts. My intent is to run the entire test suite in different environments to verify cross-platform compatibility. I want to configure this in the workspace config directly for more fine grained control instead of using cli options.
The bug is that any browser configuration (no matter which provider is used) fails to resolve module aliases if they are configured from the workspace root. It works if they are configured e.g. via a package specific vitest.config.ts file but not via the workspace root config.
The provided reproduction showcases that in the simplest way possible.
Reproduction
https://github.com/fubhy/vitest-workspace-repro
System Info
System:
OS: macOS 14.0
CPU: (12) arm64 Apple M2 Max
Memory: 117.16 MB / 32.00 GB
Shell: 3.6.1 - /nix/store/brlkinambh1hg2baqy43fyi7x66nqy8q-fish-3.6.1/bin/fish
Binaries:
Node: 20.9.0 - /etc/profiles/per-user/fubhy/bin/node
npm: 10.1.0 - /etc/profiles/per-user/fubhy/bin/npm
pnpm: 8.10.2 - /etc/profiles/per-user/fubhy/bin/pnpm
bun: 1.0.11 - /etc/profiles/per-user/fubhy/bin/bun
Browsers:
Chrome: 120.0.6099.109
Safari: 17.0
npmPackages:
@vitest/browser: ^1.0.4 => 1.0.4
vite: ^5.0.4 => 5.0.8
vitest: 1.0.4 => 1.0.4Used Package Manager
pnpm
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)pr welcome