-
Notifications
You must be signed in to change notification settings - Fork 187
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
Bug: resolves using node_modules when using PnP #273
Comments
Expected, because |
I originally did that, but that causes it to throw on resolving |
What is the real case problem? |
I'm adding |
Please describe the problem, not code, |
The problem is that
Yes, the pnp patch doesn't support it at the moment, it only respects the |
So you expected throw error?
It was fixed in the latest version, webpack supports |
Yes, it has been told where the package is but the file (
I'm aware, it's for the |
I'm aware this is how the node modules resolution works but would you be open to changing it for when PnP is enabled / adding an option for it? PnP is supposed to not let you resolve something you haven't declared but |
I've run into this on a project and spent quite a bit of time confused as I wasn't expecting webpack to fallback to node_modules. In my project, this has caused 2 different instances of react-dom to be loaded, one from pnp and one from node_modules, resulting in react crashing. I'm still trying to figure out why webpack is falling back to node_modules, since I'm not seeing any errors. Would definitely be nice if webpack exclusively used pnp when resolving dependencies in a pnp project. |
No, it shouldn't affect this issue. |
Describe the bug
When running under Yarn PnP
enhanced-resolve
will still use thenode_modules
resolutionTo Reproduce
Setup:
Code:
The text was updated successfully, but these errors were encountered: