esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

Fix subpath imports with Yarn PnP

Open evanw opened this issue 2 years ago • 0 comments

Node has a little-used feature called subpath imports which are package-internal imports that start with # and that go through the imports map in package.json. Previously esbuild had a bug that caused esbuild to not handle these correctly in packages installed via Yarn's "Plug'n'Play" installation strategy. The problem was that subpath imports were being checked after Yarn PnP instead of before. This PR reorders these checks, which should allow subpath imports to work in this case.

Note: Tests are currently failing due to a bug in Yarn itself: https://github.com/yarnpkg/berry/issues/3843. This PR is blocked on that bug being fixed.

Fixes #2545

evanw avatar Sep 14 '22 03:09 evanw