-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn berry pnp support #163
Comments
@yichi-yang sorry for ping, could you please check if this solution is ok, I'll provide a pr |
I'm not the maintainer of webpack-asset-relocator-loader (though I did contribute a few bug fixes recently) so I'm not very familiar with how bundling works here. Maybe you can make a PR and let the maintainers take a look? |
I see that you're using
resolve
package, which does not work with pnp, and does not want to merge pnp support into repo.To fix this,
resolve
maintainer created an api to hook into resolution.Yarn team from their side created a patch, which applied when resolve installed.
https://github.dev/yarnpkg/berry/blob/5f123d0301030a29fa28ef89b1974c016edb50dc/packages/plugin-compat/extra/resolve/normalize-options.js#L1
This is what I have in yarn.lock
"resolve@patch:resolve@^2.0.0-next.3#~builtin<compat/resolve>":
But because assets relocator loader bundles
resolve
, it's not possible to apply a patch.To fix this we need to make
resolve
external, does not bundle it, and declare it as dependency in package.json.I can provide a pr.
The text was updated successfully, but these errors were encountered: