-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
fix(resolve): make tryNodeResolve more robust #9170
Commits on Nov 14, 2022
-
feat(resolve): support "fallback array" in package exports field
Closes vitejs#4439 More context: vitejs#10504
Configuration menu - View commit details
-
Copy full SHA for 165cdef - Browse repository at this point
Copy the full SHA 165cdefView commit details -
Configuration menu - View commit details
-
Copy full SHA for 606f126 - Browse repository at this point
Copy the full SHA 606f126View commit details -
Configuration menu - View commit details
-
Copy full SHA for a94200f - Browse repository at this point
Copy the full SHA a94200fView commit details -
fix: config bundling regression
Bug introduced in vitejs#10683 Some packages use "require" instead of "default" for CJS entry
Configuration menu - View commit details
-
Copy full SHA for 296fe46 - Browse repository at this point
Copy the full SHA 296fe46View commit details -
fix: respect
overrideConditions
andisRequire
…in the `getInlineConditions` function.
Configuration menu - View commit details
-
Copy full SHA for 4d3c6ac - Browse repository at this point
Copy the full SHA 4d3c6acView commit details -
fix: try
resolveExports
call with postfix included…and avoid breaking certain `tryFsResolve` calls too (like with `es5-ext`)
Configuration menu - View commit details
-
Copy full SHA for bb4fbd0 - Browse repository at this point
Copy the full SHA bb4fbd0View commit details -
fix(resolve): make tryNodeResolve more robust
The "{id}/package.json" lookup done by `resolvePackageData` is insufficient for certain edge cases, like when "node_modules/{dep}" is linked to a directory without a package.json in it. With this PR, you can now import any file from node_modules even if it has no package.json file associated with it. This mirrors the same capability in Node's resolution algorithm. In addition to supporting more edge cases, this new implementation might also be faster in some cases, since we are doing less lookups than compared to the previous behavior of calling `resolvePackageData` for every path in the `possiblePkgIds` array.
Configuration menu - View commit details
-
Copy full SHA for f62843d - Browse repository at this point
Copy the full SHA f62843dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 28c2587 - Browse repository at this point
Copy the full SHA 28c2587View commit details -
fix: reset all resolvedPkg variables
…instead of only the resolvedPkgId variable
Configuration menu - View commit details
-
Copy full SHA for 173ef76 - Browse repository at this point
Copy the full SHA 173ef76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5115d77 - Browse repository at this point
Copy the full SHA 5115d77View commit details -
Configuration menu - View commit details
-
Copy full SHA for fff33dc - Browse repository at this point
Copy the full SHA fff33dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 775ef0b - Browse repository at this point
Copy the full SHA 775ef0bView commit details