arcanis / ts-pnp

Transparently adds support for Plug'n'Play to TypeScript
67 stars 9 forks source link

Fixes directories masking files with the same name #6

Closed kherock closed 3 years ago

kherock commented 4 years ago

This attempts to fix #4 by attempting to match files without the trailing slash before falling back to files beneath a matching directory.

I've created a repo ts-pnp-bugs reproducing these bugs with a couple major libraries (aws-sdk and lodash/fp), and tested these changes against that repo. I have a medium-sized workspace I'm attempting to migrate to Yarn 2 + PnP and these changes unblock me.

gausie commented 3 years ago

I did this by adding a !moduleResolutionHost.fileExists(unqualified) to the if