-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerfeat: coverageIssues and PRs related to the coverage featureIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
Following from https://discord.com/channels/917386801235247114/1344949468579233805
If you have custom import conditions in a workspace package where the default points to a file that does not exist (say, a ./dist/file.js), and import conditions in the parent package, then running vitest with coverage and all will fail.
I'm not sure of the exact path towards the error, but the significant area appears to be that vite's resolveSubpathImports is called without the conditions specified in vitest config.
Reproduction
https://github.com/mrginglymus/vitest-coverage-import
System Info
-Used Package Manager
yarn
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.
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerfeat: coverageIssues and PRs related to the coverage featureIssues and PRs related to the coverage featurep3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)