Minification failed. Returning unminified contents

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Still tweaking and optimizing content on my http://ehubcap.net site.
I was able to bump the grade to 87/100 but there is this pesky error that I cannot tackle, even though I have a general understanding of the cause.
Here is what Google PageSpeed Insight parsing the javascript bundle found, conversely disallowing the test to finish:
/* Minification failed. Returning unminified contents.
(9528,262): run-time error CSS1054: JavaScript error in expression property: Variable has not been declared: ignoreMe
*/

Well an undeclared JS global? according to my research, the solution seem to be editing the GlobalsToIgnore setting in the webgrease manifest file to include:
<GlobalsToIgnore>ignoreMe</GlobalsToIgnore>
so the task can finalize the run sucesffully and allow me to reduce the size of
http://ehubcap.net/bundles/styles/m_-k4knxhunaghoctbzgv93owj0bpre8tqtz7e6jyqe1.css?v=rO0nmbulduClHDKv9fM2CJdWFFAHnCCk8IWY6YSyqQo1
by 10KiB (27% reduction).

Question:
How can I accomplish that?
Thank you all

Stackoverflow has this:
"WebGrease supports two modes: runtime and buildtime.
Runtime mode is used by ASP.NET during bundling and minifying. In this mode, WebGrease DLLs are called during the run time of the web site.
Buildtime mode (or command line mode) is used when WG.EXE is called from command line or from build process.
WebGrease manifests is the feature that is only available for build time or for running WG.EXE from command line. These manifest files provide the way for user to add the additional configuration parameters for WebGrease (such as "GlobalsToIgnore").
Unfortunately, WG manifests are not available for runtime. So, if you are minifying from ASP.NET, you will not be able to use them."
9 years ago
Hi there.

Do you get any help?

Im having the same problem, and posted it here:

https://www.nopcommerce.com/boards/t/31627/js-and-css-bundle-and-minimify.aspx

Thanks!
9 years ago
Hi Ivan, haven't corrected the error flagged by page speed insights parser, it seem like bringing the code into compliance isn't feasible because some locked modules or assemblies, I put this issue in my pending tasks for a further review
Thank you
Jose
ehubcap
9 years ago
Well, ok.

But I think the CSS & JS files arent beeing compacted correctly after this error, because I have another files that are not included in bundled CSS.

Or, it is another bug.

Lets keep in touch.

Ivan.
9 years ago
Any help?
9 years ago
Hi Ivan, how's it going?
I'm working in a different perspective that include a solution for the issue; serving static content thorough a CDN that will take care of that with it's own assemblies and structured libraries, Google it for options, may be a better choice for you, it's for me now
Thank you
Jose
9 years ago
Hi!

I just remove the CSS part where ignoreMe is used. I noticed that, in most of cases, it is used for IE6 compatibility, so, no used anymore!

Solved by the easiest way!!! ;)

See you!
9 years ago
Thank you Ivan, I'll give it a shot on my dev site
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.