-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Export * and export default #328
Comments
edit: this is wrong, see my next comment. 😳 |
@jkimbo Are you running ESLint on the transpiled code? If you do, that could explain the error, but I don't see why you would do that. |
@jfmengels: if @jkimbo: http://www.ecma-international.org/ecma-262/6.0/#sec-getexportednames, 7.d.i. seems to be filtering IIRC I did this because |
Thanks for digging into it @benmosher ! I can attempt a PR to fix it (though not until tomorrow) if that would help? |
@jkimbo Yes please, that'd be great :) |
You're welcome to take a stab at it, but I think it goes pretty deep into the exported namespace tracking so it may get dicey. You may want to fail fast. |
I get the error
Multiple default exports
when trying to export everything from another file including the default export e.g.It looks like that this case should throw an error (as shown by this test case) however babel compiles the code
export * from './foo';
to:Reference
so the second export is necessary to ensure the default export also gets exported.
Any suggestions? I'm not sure whether it's actually babel which is at fault here or if the assumption in this plugin is wrong. Happy to contribute a PR if a solution is agreed on.
The text was updated successfully, but these errors were encountered: