shiftx / esbuild-plugin-pnp

MIT License
5 stars 0 forks source link

Doesn't support TypeScript paths and project references #1

Open schickling opened 3 years ago

schickling commented 3 years ago

Thanks a lot for creating this great plugin @eigilsagafos.

It seems that currently the plugin doesn't support TypeScript's path feature leading to errors like these:

image

Esbuild itself does support TS paths out of the box, so it would be great if this plugin could also support this crucial feature for larger projects.

eigilsagafos commented 3 years ago

Thanks for reporting and I do agree with you @schickling. I guess in this case pnpPlugin should just ignore packages that are marked in the ts config?

merceyz commented 3 years ago

We suggest not using that config at all and instead using the link: protocol https://yarnpkg.com/features/protocols/#why-is-the-link-protocol-recommended-over-aliases-for-path-mapping

dlindenkreuz commented 3 years ago

The official Yarn plugin has the same issue.

I found a workaround for my specific use case: https://github.com/yarnpkg/berry/issues/2549#issuecomment-788833177

@schickling You'd probably only need to adjust the regex for your case.