-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Vite ignores resolve.mainFields, if ssr is false #8659
Copy link
Copy link
Closed
Labels
p3-downstream-blockerBlocking the downstream ecosystem to work properly (priority)Blocking the downstream ecosystem to work properly (priority)
Description
Describe the bug
When transforming files without ssr flag Vite resolves package path to module entry point in package.json, even if resolve.mainFields is empty.
This doesn't happen, if we transform files with ssr: true. Not sure if this is a bug, or this options is intended to work differently between web and ssr.
Reproduction
System Info
AnyUsed Package Manager
npm
Logs
No response
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.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- 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-downstream-blockerBlocking the downstream ecosystem to work properly (priority)Blocking the downstream ecosystem to work properly (priority)