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
unknown directives retained #3166
Comments
It appears that older versions of uglify also retained the unknown directives within functions - the string
Whether unknown directives were retained historically is not important. The question is how should it work in the Compressor. |
A new |
Was first noticed while debugging some ESTree AST. Must not be a real issue in the wild. Both If I add such a compress option to |
Bug report or feature request?
feature request
Uglify version (
uglifyjs -V
)uglify-js 3.3.28
JavaScript input
An older uglify version:
Is it worth adding a new
"directives"
compress
options defaulting totrue
to drop directives other than"use strict"
and"use asm"
? There might be obscure use cases with custom directives out in the wild. Perhaps this option could default to allowable directives - i.e.:-c directives=["use strict", "use asm"]
.The text was updated successfully, but these errors were encountered: