-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
fix: importing through mjs in webpack@4 #615
Conversation
Is this still an issue? |
Yep! There is no minor updates for "react-scripts" package. I've rechecked reproduction, it is still actual. |
@davidyuk That's expected. Until "overrides": {
"uuid": "9.0.0-beta.0"
} Then
Give that a try and let us know if you still see the problem. |
1376d8b
to
27ad96d
Compare
Firstly I didn't noticed
The issue is not in dependencies of I've rebased my fix on the top of |
Thanks for looking into this again. I'm still a bit reluctant of adding support for a niche feature here ( I'm leaning towards thinking that users who decide to use Did you try the |
I know it would work. Our case is that we building a library wich decided to use React native using own builder (not My concerns was primally about react native, but this is not related case and since |
Closing this out for lack of activity and interest. Let me know if we should reopen. |
I have trouble importing this package in an
mjs
file in a project created using create-react-app@4.0.3.Here is a reproduction: https://github.com/davidyuk/reproductions/tree/react-uuid
You need to run
yarn && yarn build
the see the error:create-react-app@4.0.3 uses webpack@4 that resolves dependencies differently if
mjs
files are involved. It is fixable by enablingjavascript/auto
formjs
, but create-react-app doesn't allow to change configuration without ejecting. So, I'm proposing to apply a fix that makes it works, it is based on webpack/webpack#7482 (comment).