-
Notifications
You must be signed in to change notification settings - Fork 626
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
Issue with export class Bug { ... }; export default Bug;
in Babel 7
#199
Comments
I initially found this problem while investigating this React Native issue. Additionally I think this React Native issue might be related, which @charpeni was able to repro on a naked Metro setup. In both cases, the issue can be addressed by using two separate expressions to declare the class versus export it. |
This Babel issue may be related. It looks like the specific issue there had to do with plugin ordering, which perhaps is the culprit here (though I doubt in the same way). |
Yeah, it could be. Apparently scope traversing has some bugs in Babel. I've tried pinging them with no luck, though. |
If we could get a pure-Babel repro I think it would easier to get their attention. But my attempts at that were unsuccessful, probably because I’m not accurately mirroring the way Metro consumes Babel. Any advice? |
The issues I've found so far are related to calling |
I think this may be fixed via Babel 7.0 and Metro 0.44.x (once this is merged #233) |
Yes, we can close this one already! 😄 |
I am seeing this issue with
react-native@0.56.0
andmetro@0.38.3
(and alsometro@0.38.1
).Here's the code that causes the issue:
The error is:
I've created a repo with this minimal repro here. I attempted to repro the issue without Metro, by setting up a Babel project with the same code and
babel-preset-react-native
here, but was unable to repro. My conclusion is that the issue has something to do with how Metro consumes Babel.The text was updated successfully, but these errors were encountered: