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
side_effects=false,pure_getters causes runtime error #5794
Comments
IMHO the generated code is valid − you specified So your best bet in this case is not disabling |
@alexlamsl I ran Since it’s something introduced by a PR named “enhance conditionals” it does not feel like an intentional change? |
It is intentional in the sense that it is within the definition of I will look at whether we can avoid generating this intermediate/extraneous |
It might also make sense to update the documentation for |
Documentation for
If you would like to improve this text or something else in the documentation, feel free to submit a Pull Request. |
I would love to, but I don’t understand the option anymore (even when reading that text), so unfortunately I can’t. |
Uglify version (
uglifyjs -V
)uglify-js 3.17.4
JavaScript input
The
uglifyjs
CLI command executed orminify()
options used.JavaScript output or error produced.
Terminal session, showing before and after:
Final details:
pure_getters
is safe to use on JS generated by Elm.side_effects
because I tried to optimize: I disable everything in uglify that, paired with esbuild's minifier, does not reduce the size of compiled Elm code, in an attempt to minify as quickly as possible.side_effects=false,pure_getters
not to result in invalid code regardless.The text was updated successfully, but these errors were encountered: