Skip to content

Default exports with parens fails #421

Description

@Rich-Harris

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions