Closed
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
https://stackblitz.com/edit/node-gslx3n?file=vite.config.ts,package.json,Comp.vue,vite-repro.mjs
System Info
Any
Used 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.
Activity