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

Overly aggressive minification of void f in JavaScript #463

Closed
earthboundkid opened this issue Feb 4, 2022 · 2 comments
Closed

Overly aggressive minification of void f in JavaScript #463

earthboundkid opened this issue Feb 4, 2022 · 2 comments

Comments

@earthboundkid
Copy link
Contributor

input:

const f = x => void console.log(x);

output:

const f=a=>{}

In the original code, console.log is called for its side effect, and in the minified code, it is not.

earthboundkid added a commit to spotlightpa/viz-redistricting-2020 that referenced this issue Feb 4, 2022
earthboundkid added a commit to spotlightpa/viz-redistricting-2020 that referenced this issue Feb 4, 2022
@tdewolff
Copy link
Owner

tdewolff commented Feb 4, 2022

Thanks for the issue, we should check for side-effects on all removals. I'm just about to take vacation, I'll take a look when I'm back!

@tdewolff
Copy link
Owner

tdewolff commented Mar 3, 2022

Should be working now, please let me know if you have any issues ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants