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

some numeric literals could be more compact #122

Closed
kzc opened this issue May 19, 2020 · 1 comment
Closed

some numeric literals could be more compact #122

kzc opened this issue May 19, 2020 · 1 comment

Comments

@kzc
Copy link
Contributor

kzc commented May 19, 2020

minor optimization...

$ esbuild --version
0.3.5
$ echo 'console.log(0.00001234)' | esbuild --minify
console.log(1.234e-05);

$ echo 'console.log(0.00001234)' | terser
console.log(1234e-8);
$ echo 'console.log(123400000)' | esbuild --minify
console.log(1.234e08);

$ echo 'console.log(123400000)' | terser 
console.log(1234e5);
@evanw
Copy link
Owner

evanw commented May 19, 2020

Thanks for logging this. That's been bugging me too. I wish Go could just do this natively, but it looks like I'm going to have to do a custom transformation.

@evanw evanw closed this as completed in b0eb885 Jun 5, 2020
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