-
Notifications
You must be signed in to change notification settings - Fork 6
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
Existing package.json
breaks module consumption
#2
Comments
Hi @ranweiler ! We don't include For the reactify issue, see 9d31268 Let me know if that fixes things! |
Ah, thanks for the quick response and insight about the other issue! I just tested your commit with my example repo. The build in
If I go into the However, when I try to wipe the state inside of the installed
So it looks like the |
This is expected behavior for npm: https://docs.npmjs.com/misc/scripts You need to add |
Ah, my tests pass after installing This fixes the issue for me. Thanks very much! |
Hello! I have two small configuration issues to report.
I discovered them when I ran into mui/material-ui#344.
It looks like the current
package.json
is triggering some bugs for Browserify and even NPM consumers. I've created a repo to provide minimal examples of the issues: https://github.com/ranweiler/poc-react-draggable2(1) Consuming
react-draggable2
usingrequire
is broken due to a missing production dependency onreact
:The fix for this is simply to make the relevant version of
react
a production dependency inpackage.json
.(2) The global
reactify
transform in thepackage.json
ofreact-draggable2
breaks consumption by Browserify unless the consumer hasreactify
installed, either globally or in their consuming project. This is becausereactify
not listed in thedependencies
field. Ifreactify
is not in therequire
path of a consumer, an attempt to bundle a module which requiresreact-draggable2
results in an error like the following:The fix for this is just to remove the global transform from the
package.json
ofreact-draggable2
. If the global transform really is required for a reason I'm missing, then leaving it in and makingreactify
a production dependency should be an alternate fix.I've made these small changes in a fork, and will open a pull request for review. All tests still pass, but my concern is that my changes haven't disrupted the webpack configuration. I'm not a webpack user, so I can't validate that beyond ensuring that the existing tests pass. Thanks!
The text was updated successfully, but these errors were encountered: