-
Notifications
You must be signed in to change notification settings - Fork 662
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
Wrong argument to uglifyjs on .../hints/optimize.md #2162
Comments
Thanks for reporting this! To set expectations:
Finally, please be patient with the core team. They are trying their best with limited resources. |
I happen to encounter the same. #!/bin/sh
set -e
js="elm.js"
min="elm.min.js"
elm make --optimize --output=$js $@
uglifyjs $js --compress "pure_funcs=[F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9],pure_getters,keep_fargs=false,unsafe_comps,unsafe" | uglifyjs --mangle --output $min
echo "Initial size: $(cat $js | wc -c) bytes ($js)"
echo "Minified size:$(cat $min | wc -c) bytes ($min)"
echo "Gzipped size: $(cat $min | gzip -c | wc -c) bytes" I hope it helps ;] |
I ran into this exact problem some time ago when I was first learning Elm. I eventually figured it out. Is there a PR for this? I can also confirm this works:
|
It should be the same on every system as (if memory serves) it is handled by uglifyjs directly. So I will add a PR. |
Thanks to @Caleb-Irwin for the fix. |
No problem! Happy to help Elm. |
Quick Summary: The argument
--output=elm.min.js
to uglifyjs should be--output elm.min.js
Additional Details
On https://github.com/elm/compiler/blob/master/hints/optimize.md, this appears twice. First, in "here is how I would optimize", second in the scripts section.
uglifyjs fails with "ERROR: invalid option --output=elm.min.js"
I have installed uglify-js 3.12.4
If you can not reproduce this, please let me know. Thanks.
The text was updated successfully, but these errors were encountered: