-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pnp: esbuild@0.15.3
unable to resolve esm packages
#2473
Comments
Thanks for the report. I can reproduce the issue. It looks like Yarn PnP disables interpretation of The reason this is happening is because Yarn PnP's specification says to run node's module resolution algorithm afterward on the result (specifically the last line):
However, node's module resolution algorithm only interprets
The paths coming out of Yarn PnP are no longer package paths because they have been resolved to a directory by Yarn PnP so esbuild doesn't interpret the Pinging @arcanis regarding what to do about this. |
The way we handle this is that we make the "is it a package import" check on the specifier, not the resolution / unqualified path (if it's a package import, we then use the unqualified path to read the |
The fix for this issue broke importing workspaces, the verbose logs also show it doing a lot of file IO trying to locate stuff in |
Can you provide an example test case? I’m building up a suite of Yarn PnP tests for CI and that would be very helpful to have. |
I can indeed, opened #2476 with a reproduction to track the regression. |
strtok3 has subpath exports. import * as strtok3 from 'strtok3/core'; |
Thanks for calling this out. I have realized this as well, and already have a fix. I'm currently working on getting it ready to be released. |
Was able to track this down, opened #2481. |
To Reproduce
Result
The text was updated successfully, but these errors were encountered: