-
Notifications
You must be signed in to change notification settings - Fork 190
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
Resolving root path in RootsPlugin #308
Comments
Can you provide example how we can reproduce it? |
Thanks for the quick turnaround! I don't have a simple repro for now as my project's webpack config involves quite some plugins. Some info for the issue: I am working on upgrading to [email protected], [email protected], and there is a fallback config for crypto: I will see if I can get a simple setup to repro the issue and update here. Thanks again. |
Yep, feel free to ping me |
Updated with a repro, please check. |
hm, looks line |
Oh good to know that, the project was originally created with create-react-app which brings in the ModuleScopePlugin at the beginning, I can try out the new setting. Regarding the error, from what I found, the However the RootsPlugin returns a wrong path after it concatenates two root paths, and then later resolver cannot find the description file (package.json) of the 'crypto-browserify' package, that seems to set the |
Maybe |
For the build error I have workarounds anyway. For a fix here in RootsPlugin it seems to me that it should simply return callback() when the request.path is already a rooted path, so I am trying to understand the reasons of existing logic. |
Note - you can have multiples roots |
You mean multiple roots as in |
Need check, just information 😄 I can look at this at weekends, feel free to ping me if you don't found solution |
Hi, while I am tracing down an issue from react-dev-utils/ModuleScopePlugin, I found that line 37 in RootsPlugin is causing different behavior between linux and windows as it only check for the
/
path separator:enhanced-resolve/lib/RootsPlugin.js
Lines 34 to 42 in d1a3cb6
Also I am curious about when the request path is an absolute path starting with '/', why we want to trim off the '/' and treat it as a relative path and concatenate it with another root path?
---- A simple setup to repro the issue
npx webpack
Then I am seeing
The text was updated successfully, but these errors were encountered: