Skip to content
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 resolving package self references #10114

Merged
merged 1 commit into from
Mar 19, 2025
Merged

fix resolving package self references #10114

merged 1 commit into from
Mar 19, 2025

Conversation

devongovett
Copy link
Member

The Node ESM resolution algorithm has a special case for package self references, i.e. packages importing themselves. Usually, these can be resolved as normal, by resolving from node_modules/foo/bar.js up to node_modules/foo/package.json. However, if the module is not actually inside a node_modules directory this doesn't work. In particular, Pnpm uses a web of symlinks into a .pnpm directory, and does not symlink the module itself into its own local node_modules folder. Therefore, we need to implement this special case for self references.

@devongovett devongovett merged commit e2c2a29 into v2 Mar 19, 2025
17 checks passed
@devongovett devongovett deleted the fix-self-resolution branch March 19, 2025 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants