Skip to content

keep-names to only be applied when name is changed #2605

@privatenumber

Description

@privatenumber

I would like to request for --keep-names to only be applied when the name is changed (e.g. via minification).

Currently, it applies even if the name is unchanged: https://hyrious.me/esbuild-repl/?version=0.15.10&mode=transform&input=function+name%28%29+%7B%7D&options=--keep-names

This improvement should have the benefit of reducing transformation size and also preserve as much of the original code when possible (which can help with #1438).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions