We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
(I'm using 9.8.0 latest stable framework of SquishIt.
Problem with javascript minify. When it minify long variables like _function(imReallyLong)_ to _function(n)_
This is ok for minify but if you are not using eval()!
My method was:
Fire: function (jDto) { var sectionName = Enum.Parse(Enum.SectionID, jDto.SectionID); eval('Section.Init.' + sectionName + '(jDto)'); },
After minify:
Fire: function (n) { var t = Enum.Parse(Enum.SectionID, n.SectionID); eval("Section.Init."+t+"(jDto)") },
The problem jDto variable. It is hard coded as string and SquishIt can't know it.
Is it possible to prevent changing variables option or something like that? Or more cool framework?
Thank you.
(http://stackoverflow.com/questions/32552473/squishit-replacing-with-short)
The text was updated successfully, but these errors were encountered:
This is minifier behavior, not squishit.
I think you might be able to work around it with the MS Minifier using something like this (http://stackoverflow.com/questions/5888580/ajax-minifier-ajaxmin-evaltreatment-for-javascript):
.WithMinifier(new MsMinifier(new CodeSettings { EvalTreatment = EvalTreatment.MakeAllSafe }))
There is an ignoreEval option for YUI minifier that looks like it allows functions calling eval to be compressed (https://github.com/BillyChan501/YUI-Compressor-.NET/blob/master/Projects/Yahoo.Yui.Compressor/Model%20Tests/JavaScriptCompressorTest.cs#L218-L256). So the example you have might "just work" using default YUI options for minification?
.WithMinifier<YuiMinifier>()
Sorry, something went wrong.
Did you use the .MakeAllSafe method with the MS minifier? I'm wondering if that should be the default behavior going forward.
I plan to make YUI the default minification option as of v1.0 so that may make sense if we want to keep behavior consistent.
No branches or pull requests
(I'm using 9.8.0 latest stable framework of SquishIt.
Problem with javascript minify. When it minify long variables like _function(imReallyLong)_ to _function(n)_
This is ok for minify but if you are not using eval()!
My method was:
After minify:
The problem jDto variable. It is hard coded as string and SquishIt can't know it.
Is it possible to prevent changing variables option or something like that? Or more cool framework?
Thank you.
(http://stackoverflow.com/questions/32552473/squishit-replacing-with-short)
The text was updated successfully, but these errors were encountered: