AnsweredAssumed Answered

Surf use-aggregate-dependencies and yuicompressor

Question asked by loftux Moderator on May 14, 2012
Latest reply on Aug 10, 2012 by ddraper
I want to understand when yuicompressor is used in combination with the upcoming Surf feature use-aggregate-dependencies.

My concern here is that yuicompressor actually have some bugs that cause compressed files not to be usable. If you have complete control over the code you can of course make sure you avid those bugs, but if you use 3rd part javascript libraries this is not always something you can control.

One example is the pdf.js based viewer currently beeing developed in Share Extras project. The pdf.js library cannot be compressed with yuicompressor due to this bug So we use jsmin for that library specifically.

But you still may want to use 'use-aggregate-dependencies' for all other code in Share, not to turn that off because of use of an addon.
- Will the yuicompressor only be used if Surf cannot find a minified version of the script or will yuicompressor be run on the concatenated script always?
- Can you avoid this instead by not using the "group" directive, ie the non yui compressable script cannot be part of an aggregation, but that ok since it is an exception an you can take advantage of the aggregation for all other scripts.