liady / webpack-node-externals

Easily exclude node modules in Webpack
MIT License
1.3k stars 62 forks source link

Support for Yarn 2 PnP #109

Open jakubzitny opened 3 years ago

jakubzitny commented 3 years ago

In Yarn 2 PnP mode, there is no node_modules folder. Everything is in .yarn cache and kept loaded in memory. Would it be possible to add support for this in webpack-node-externals or have you already thought about it?

tarikjn commented 3 years ago

Bumping this up. I expected webpack-node-externals to just work with PnP and it took me a while to find that this was my issue.

I found two packages that implement this:

At first glance it seems that this could be handled by another package than webpack-node-externals, but ideally webpack-node-externals, or a higher-level package should handle package manager context automatically, the rationales are: