Skip to content
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

Default exports with parens fails #421

Closed
Rich-Harris opened this issue Jan 5, 2016 · 1 comment
Closed

Default exports with parens fails #421

Rich-Harris opened this issue Jan 5, 2016 · 1 comment

Comments

@Rich-Harris
Copy link
Contributor

Via rollup/rollup-plugin-babel#28.

This fails:

// main.js
import foo from './foo.js';
foo();

// foo.js
export default (function () {
  console.log("Hi!");
})

Remove the parens around the default export and it works fine. It appears to be specific to functions (this works fine).

This is particularly problematic because this is how Babel transpiles arrow function expressions.

@Pauan
Copy link
Contributor

Pauan commented Jan 10, 2016

I just upgraded to version 0.24.1, and it's fixed! Thanks a lot! I appreciate the work you've put into rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants