Closed Nintai closed 3 years ago
How are you invoking NUglify? What minification switches are you providing?
And are you on the latest NUglify?
var minificationResult = Uglify.Js(response.Content,
new CodeSettings
{
MinifyCode = true,
OutputMode = OutputMode.SingleLine,
StripDebugStatements = true,
ReorderScopeDeclarations = false,
StrictMode = false,
TermSemicolons = true,
PreserveImportantComments = false,
KnownGlobalNamesList = "tinymce"
});
I updated to 1.13.8 to test if its fixed, still the same problem.
Are there any errors on minificationResult
?
Will look further at this later, just the code youve posted is incomplete and doesnt cause the errors you describe. If you can edit the test ive made here and make it fail I'll take a look:
After much more testing i can say this: It seems to be the same error that is already fixed with https://github.com/trullock/NUglify/issues/241
I did upgrade the Nuget Package to 1.13.8, but it seems i had some issue with cache that prevented it from being generated correctly. Now after all that testing i managed to get it to work with 1.13.8 so i guess.... not a bug, just stupidy by me.
Sorry to waste your time like that and thanks for your immediate attention.
No problem, glad you're sorted :)
I recently upgraded the tinymce library im using to 5.7.1 and now Nuglify seems to create a problem with the javascript file it generates.
I was able to find the exact line that causes the problem: In tinymce.js
This is minifed in tinymce.min.js (the
e=of(e,o)
):Rh(r.attributes,function(e,t){var n;if(e=of(e,o),O(t)&&(t=e,i=null),....
The result of this in the javascript file i generate with NUglify:
cft(t.attributes,function(n,i){var r;if(n=,ws(i)&&(i=n,u=null),....
the part in question isn=,
which causes an error upon executing the javascript in the browser.