-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
feat: workspaceIssues and PRs related to the workspace featureIssues and PRs related to the workspace featurepending triage
Description
Describe the bug
resolve.conditions config for workspace is ignored when resolving nested node_module.
When you import a module, which then imports another module that relies on export conditions vitest is not honoring those conditions if they are defined in the workspace config.
If you define the resolve conditions in the main vitest.config.ts it will resolve the nested module, however I am trying to have server & client tests in a workspace which need different conditions (the browser condition is different between them).
Note this previously worked fine in 1.2.2. It was broken in 1.3.0.
Reproduction
Clone https://github.com/DylanPiercey/vitest-resolve-condition-nested-issue
System Info
System:
OS: macOS 14.3.1
CPU: (10) arm64 Apple M1 Max
Memory: 7.14 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/Library/Caches/fnm_multishells/47552_1708985680346/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.2.5 - ~/Library/Caches/fnm_multishells/47552_1708985680346/bin/npm
pnpm: 8.15.1 - ~/pnpm/pnpm
bun: 1.0.25 - ~/.bun/bin/bun
Browsers:
Chrome: 122.0.6261.69
Edge: 122.0.2365.52
Safari: 17.3.1
npmPackages:
@vitest/ui: latest => 1.3.1
vite: latest => 5.1.4
vitest: latest => 1.3.1Used 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: workspaceIssues and PRs related to the workspace featureIssues and PRs related to the workspace featurepending triage