Skip to content

Re-export with spaces don't work #29242

@Superstar64

Description

@Superstar64

What version of Bun is running?

1.3.12

What platform is your computer?

Linux 6.12.74+deb13+1-amd64 x86_64 unknown

What steps can reproduce the bug?

Run this example:

// a.mjs
export { "a b c" as a } from './b.mjs';
// b.mjs
const a = 1;
export { a as "a b c" };

What is the expected behavior?

Bun should probably parse re-exports with spaces.

What do you see instead?

Bun fails with a syntax error when parsing re-exports with spaces.

1 | export { "a b c" as a } from './b.mjs';
    ^
SyntaxError: Unexpected identifier 'b'. Expected '}' to end an export list.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions