webpack-node-externals
webpack-node-externals copied to clipboard
Support for Yarn 2 PnP
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?
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:
- https://github.com/jonhartnett/webpack-pnp-externals (looks more complete/correct)
- https://github.com/tonyfromundefined/pnp-node-externals
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:
- this package is called
webpack-node-externals
, notwebpack-npm-externals
- standardized options
- most importantly: to avoid having the package manager setup leak into webpack configs