Open PavelFil opened 1 month ago
In this way, Uglify will call the AST_Binary.print methods recursively and can lead to stack overflow error. You can try to replace doit() function call with it's actual code to reduce call frame.
// ./lib/output.js
AST_Node.DEFMETHOD("print", function(stream, force_parens) {
var self = this;
stream.push_node(self);
if (force_parens || self.needs_parens(stream)) {
stream.with_parens(doit);
} else {
// doit()
stream.prepend_comments(self);
self.add_source_map(stream);
self._codegen(stream);
stream.append_comments(self);
}
stream.pop_node();
function doit() {
stream.prepend_comments(self);
self.add_source_map(stream);
self._codegen(stream);
stream.append_comments(self);
}
});
uglify-js 3.19.3
test-js.zip Run
Receive