You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have source code with several debugger; statements scattered around. When I minify this code, I want to remove all but one of them, similar to how you can preserve comments with @preserve. The drop_debugger option allows you to change this, but only with an all or nothing effect. I don't have a preference on the notation, but I've used @preserve-debugger just to illustrate the issue.
Uglify version (uglifyjs -V)
uglify-es 3.3.10 JavaScript input
debugger;
debugger; // @preserve-debugger: I want this one to stay
debugger;
The uglifyjs CLI command executed or minify() options used.
uglifyjs input -c drop_debugger=false -o output1
uglifyjs input -c -o output2 JavaScript output or error produced.
output1:
output2:
debugger;debugger;debugger;
The text was updated successfully, but these errors were encountered:
Bug report or feature request?
Feature request
I have source code with several
debugger;
statements scattered around. When I minify this code, I want to remove all but one of them, similar to how you can preserve comments with@preserve
. The drop_debugger option allows you to change this, but only with an all or nothing effect. I don't have a preference on the notation, but I've used@preserve-debugger
just to illustrate the issue.Uglify version (
uglifyjs -V
)uglify-es 3.3.10
JavaScript input
The
uglifyjs
CLI command executed orminify()
options used.uglifyjs input -c drop_debugger=false -o output1
uglifyjs input -c -o output2
JavaScript output or error produced.
output1:
output2:
The text was updated successfully, but these errors were encountered: