Repository navigation
Conversation
|
@agustin18 is attempting to deploy a commit to the Nitro Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
commit: |
|
Pushed a fix so the bare package name is only used when it resolves to the same package copy and the file is a "." export under the active conditions. Without this, a require-only root export, a nested older copy, or a dual package's CJS file could break or load the wrong version at runtime; tests added for the first two. Triaged with AI assistance. |
🔗 Linked issue
Resolves #4900 (backports #4683 to v2)
❓ Type of change
📚 Description
When resolving an absolute entry path for a package whose resolved file differs from the default entry (e.g. conditional exports like in
@vue/shared),lookupNodeModuleSubpath(id)reverse-engineers the export subpath. For the package root export".", it returns"./".In Nitro v2,
join(pkgName, "./")produces${pkgName}/. Resolving that trailing-slash specifier triggers Node[DEP0155] DeprecationWarningand returnsundefined, which causes Nitro to fall back to inlining the external dependency into the bundle.This backports the fix from #4683 to
v2: whenguessedSubpathis"./"or".", externalize the package by its bare name rather than appending a trailing slash.📝 Checklist