-
Notifications
You must be signed in to change notification settings - Fork 49
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
Bug - runtime error in webpack 2.2.0-rc.4 and later #65
Comments
@echenley we could skip exporting the types when exports is undefined. Is that sufficient? I don't want to generate es6 modules, except maybe behind a config flag. |
Yeah, that works as long as users don't expect to be able to import proptypes when using this plugin? It seems very unlikely that anyone is relying on this: import { babelPluginFlowReactPropTypes_proptype_Props } from './SomeComponent' |
Yeah, the incredibly long name and lack of documentation discourages use :-) Published a fix as 0.20.0. Let me know if you have any more issues. |
Perfect, thank you! |
See babel/babel#5155
Basically:
I believe this is the Webpack change which breaks this behavior: webpack/webpack#3755.
module.exports
is now undefined when using ES6 modules.This output is therefore invalid: https://github.com/brigand/babel-plugin-flow-react-proptypes/blob/master/src/__tests__/__snapshots__/export-object-test.js.snap
The text was updated successfully, but these errors were encountered: