-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite ignores resolve.mainFields, if ssr is false #8659
Labels
p3-downstream-blocker
Blocking the downstream ecosystem to work properly (priority)
Comments
Closed
6 tasks
This part runs without regarding vite/packages/vite/src/node/plugins/resolve.ts Lines 740 to 783 in 86a55d3
This seems to be the reason. |
sapphi-red
added
bug
p3-downstream-blocker
Blocking the downstream ecosystem to work properly (priority)
and removed
pending triage
labels
Jun 19, 2022
I've also noticed it still uses |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
When transforming files without ssr flag Vite resolves package path to
module
entry point inpackage.json
, even ifresolve.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
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: