Skip to content

[Bug]: Non-ASCII object keys cause a syntax error after minification #5591

@heypiotr

Description

@heypiotr

Reproduction link or steps

https://repl.rolldown.rs/#eNptjz0OwjAMha9ieWGpOEAQCwMrEnOWiiYoUmtXqQstVSaOxXG4CKY/Agky5cl+730e0KMZMFDhurU07z+h+egMTypdV3MUODE1Ap4ZtjBYAn0W98zP+2OXR4tG5S6/WcwspY16HRqJrUsZRi7Lgq+01gwfzl9VfyZTaajGUulrBwMc57VDLUExIIGPXMFqsa8sTXhTjPkxzMjcSt2K0cQqUPD9CAhJgS1Zmg8tnM/bcsnCpAdclKjMxTWC6QWPQWwp

What is expected?

Foo・Bar should be wrapped in quotes, I guess.

What is actually happening?

const e={Foo・Bar:`Baz`};export{e as foo};
$ node
Welcome to Node.js v22.17.1.
Type ".help" for more information.
> const e={Foo・Bar:`Baz`};export{e as foo};
const e={Foo・Bar:`Baz`};export{e as foo};
                        ^^^^^^

Uncaught SyntaxError: Unexpected token 'export'
>

System Info

$ npx envinfo --system --npmPackages rolldown --binaries --browsers

  System:
    OS: macOS 15.6
    CPU: (12) arm64 Apple M3 Pro
    Memory: 2.31 GB / 36.00 GB
    Shell: 5.2.37 - /opt/homebrew/bin/bash
  Binaries:
    Node: 22.17.1 - ~/.local/bin/node
    Yarn: 4.9.2 - ~/.local/bin/yarn
    npm: 11.4.2 - ~/.local/bin/npm
    bun: 1.2.17 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 138.0.7204.184
    Edge: 132.0.2957.127
    Safari: 18.6

Any additional comments?

Dunno why envinfo doesn't show the rolldown version, but I tried with both beta.20 and beta.31, same issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions