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

Minifier should use optional catch binding #8966

Open
NotWearingPants opened this issue May 21, 2024 · 0 comments
Open

Minifier should use optional catch binding #8966

NotWearingPants opened this issue May 21, 2024 · 0 comments
Assignees
Milestone

Comments

@NotWearingPants
Copy link

Describe the feature

Input:

try {
    console.log("hello");
} catch (e) {}

Output:

try{console.log("hello")}catch(e){}

Expected output (more minified):

try{console.log("hello")}catch{}

I turned on minify & compress, and set the target to ES2022, so the target supports optional catch binding and the minifier can take advantage of it and remove the catch binding (e).

Babel plugin or link to the feature description

No response

Additional context

No response

@kdy1 kdy1 self-assigned this May 23, 2024
@kdy1 kdy1 added this to the Planned milestone May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants