Closed z-vr closed 6 years ago
Thanks! I've wanted to switch to webpack but haven't had the time so this is very much appreciated. I noticed you also moved the proptypes and defaultprops outside the class, is there a specific reason for this?
Great idea to add the example and style.css parts as well.
I'm really grateful for your help!
@tbleckert the reason is basically to enable stripping PropTypes for production mode with this plugin https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types, but I'm not sure if it's that useful, also I don't know what happens if components rely on default props, e.g., calling a stub () => {}
function
Oh nice! Should be fine I think, either way it will be tested properly before it goes out to npm. I'll merge it in.
This allows to setup a dev environment with live-reload powered by
webpack-dev-server
.I've added
style.css
as well so that people can doimport 'react-popup/style.css'
to get a default style.