You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like when I have two files importing the same relative url, that the module this relative url resolves to is somehow cached and reused. I'm running into the following problem:
The second require should fail (there is no b/mod.ts), but actually succeeds if I list a/a.ts first in the tsconfig. The generated js however just contains the relative import paths (I'm using the AMD module loader output) and so actually doesn't work.
The text was updated successfully, but these errors were encountered:
yes, this is a known bug. Reason of failure is classic" module resolution algorithm that was used in TypeScript since the beginning of time. It uses folder walk (to mimic Node like resolution) which is incorrect in this situation. We have a proposal to implement module resolution strategy that will use base url - this should address this issue
I see, I guess we can close this then. I'm considering this quite a severe issue for us, it's kind of hard to track down import path errors like this (we now resort to a tool to post-check relative import paths).
It looks like when I have two files importing the same relative url, that the module this relative url resolves to is somehow cached and reused. I'm running into the following problem:
The second require should fail (there is no b/mod.ts), but actually succeeds if I list a/a.ts first in the tsconfig. The generated js however just contains the relative import paths (I'm using the AMD module loader output) and so actually doesn't work.
The text was updated successfully, but these errors were encountered: