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

--minify-identifiers is adding new mangled class properties #15401

Closed
mattfysh opened this issue Nov 25, 2024 · 0 comments · Fixed by #15411
Closed

--minify-identifiers is adding new mangled class properties #15401

mattfysh opened this issue Nov 25, 2024 · 0 comments · Fixed by #15411
Assignees
Labels
bug Something isn't working confirmed bug We can reproduce this issue minifier transpiler parser || printer

Comments

@mattfysh
Copy link

mattfysh commented Nov 25, 2024

What version of Bun is running?

1.1.36+ededc168c

What platform is your computer?

Darwin 24.1.0 arm64 arm

What steps can reproduce the bug?

Minify and run this code:

class Foo {
  constructor(public name: string) {}
}
console.log({ ...new Foo('eggbert') })

What is the expected behavior?

{
  name: "eggbert",
}

What do you see instead?

{
  e: undefined,
  name: "eggbert",
}

Additional information

Minified output:

// report.ts
class c {
  e;
  constructor(e) {
    this.name = e;
  }
}
console.log({ ...new c("eggbert") });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed bug We can reproduce this issue minifier transpiler parser || printer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants