Closed rencarl closed 3 years ago
Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!
I'll check it today or tomorrow
Thanks for contributing
Hi @rencarl we updated all the packages in version 2.6.1
The minimization of JavaScript is done with a 3rd party package called Terser, you may want to post an issue thereafter I update all the packages again, which might solve this issue and other possible ones.
So as I said, I will update this third party package and hope that it does fix your issue because it seems like it is not MinifyAll's fault.
I will close this issue and notify you probably tomorrow when I update the extension with the new packages such as terser updated, then you can check if this issue persists, if so, you should notify the Terser team instead also in Github.
Thanks and stay tuned
Hi @rencarl MinifyAll version 2.7.1 is now available. Please check it out and tell me if that problem persists, because I tried to minify your code and I didn't see any problem with it
Thanks!!!
Sorry, the problem still persists.
I have simplified my code to:
function TEST(){
// a comment
}
TEST.prototype = {
con: function(obj){
if(typeof console.log != "undefined")console.log(obj);
}
}
window.onload = function(){
var test = new TEST();
test.con("test for console log");
alert('test for alert');
}
And this is the minified version:
function TEST(){}TEST.prototype={con:function(o){console.log}},window.onload=function(){(new TEST).con("test for console log"),alert("test for alert")};
With the minified version i only get the "test for alert", "test for console.log" is missing. And the reason is the missing parameter when calling console.log. The if condition in the con function is also absent.
Best regards!
Then you should maybe contact the terser team so they can better solve your problem.
Remember you have a MinifyAll setting called 'terserMinifyOptions' in which you can add and modify all the terser's settings or configurations in case this error is caused by a wrong setting.
Thanks again!
Remember you have a MinifyAll setting called 'terserMinifyOptions' in which you can add and modify all the terser's settings
This was the hint i needed. I don't know why, but "drop_console" was set to "true". I changed it to "false" and everything works fine again.
Thank you for your help!
Always happy to help @rencarl !!
First of all, thank you very much for your great work!
This is my code:
In previous versions the code was minified to:
In version 2.7.0 the code is minified to:
Can you fix this? If not, how do i have to change my code?
Best regards!