-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Requiring react-addons-css-transition-group includes React in webpack builds that exclude react #6343
Comments
Yes, these modules only work when packaged with the |
OK, this works (I didn't know webpack supported it)
Produces:
Thanks |
This solves the problem |
EDIT: removed to avoid confusion |
1 similar comment
EDIT: removed to avoid confusion |
I’m confused about what you’re trying to do. If you just want to exclude If you have any issues with standalone Putting them together in comments like #6343 (comment) will just further confuse future readers, as there is no relation between the two, except one is the fork of the other. |
I'm trying to use the addon in a layout component with react and react-dom as peer dependencies, but if I include it my build goes from 55k to 750k.
The published npm module is simply this line of code:
module.exports = require('react/lib/ReactTransitionGroup');
If I look at react/lib/ReactTransitionGroup, I see this line
var React = require('./React');
Which causes webpack to pull in all of react, since I only defined
'react'
as an external moduleI could make 'react-addons-css-transition-group' external to my webpack build, but there's no distributed script for just that addon that adds it to the window variable (similar to how including the
react
script addswindow.React
andreact-dom
addswindow.ReactDOM
)The
timeout-transition-group
module depends onreact-addons-css-transition-group
so it has the same problemThe text was updated successfully, but these errors were encountered: