-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Module resolution should not succeed but does #43342
Comments
Maybe we need to normalize the path before checking if it's relative? |
I suppose there's a tiny chance this is desirable, even if it appears to be happening by accident. @sheetalkamat ? |
On further reflection, the is-relative-path check probably needs to check path components after the first one. |
I dont think this is issue with module resolution.. Node works in similar way. If you make those file at runtime as js files and run them it works
|
Well, now I'm sad. |
a.ts
b.ts
node_modules/
Present but empty
Expected: import fails to resolve
Actual: import resolves because we look in
node_modules/BAD/../../a
, which simplifies toa
.The path normalization in question happens here.
The text was updated successfully, but these errors were encountered: