Skip to content

Conflicts with generated default export names #72

Description

@Rich-Harris

Found while working through #66 – bit of a tricky case, but is possibly superseded by #71, so am just going to leave this test case here:

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

assert.equal( foo(), 'not actually foo' );

// foo.js
export default notActuallyFoo;

function notActuallyFoo () {
  return 'not ' + foo();
}

function foo () {
  return 'actually foo';
}

The notActuallyFoo function gets aliased as foo (because of import foo...), and ends up calling itself, blowing the stack.

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