Expand my Community achievements bar.

Minifying not working for Cloud environments

Avatar

Level 2

Hi everyone,

 

I´m trying to minify the clientlibs for my AEM cloud project. I achived the goal in my local environment by adding the next osgi config:

com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl.cfg.json

 

{
"htmllibmanager.minify": true,
"htmllibmanager.gzip": true,
"htmllibmanager.debug": false,
"htmllibmanager.processor.js": [
"min:gcc;obfuscate=true;languageIn=ECMASCRIPT_NEXT;languageOut=ECMASCRIPT_NEXT;compilationLevel=simple"
],
"htmllibmanager.processor.css": [
"min"
],
"htmllibmanager.timing": false
}

In my local environment it is working fine (both publish and author instance). However when this config is deployed to a cloud environment (development and also tried in rde) it seems to do nothing, the clientlibs are not minified. I have checked the osgi config in the cloud environments via developer console and it is correctly deployed. 

 

Has anybody faced anything similar? There is something that is blocking the minify in this environments?

 

Thank you all in advance for your help

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

Hi @Developer_anon ,

 

Please check error.log file there you might see some error associated with that clientlibs. Also, are you seeing "min" extension for your clientlib file?

 

-Tarun

 

Avatar

Level 2

Yes, we have tried the logs but there is no info in there. And yes, the clientlibs has the ".min.js" extension, but they are not minified at all.

Avatar

Community Advisor

Try to cross check once if the osgi config is deployed properly using developer console.
Also, it could simply be a cache issue. Please try to hit the entire URL directly with some query param. www.yourdomain.com/etc.clientlibs/your-clietnlib.min.js?q=x 

Avatar

Community Advisor

@Developer_anon Have you tried Rebuild Client Libraries- /libs/granite/ui/content/dumplibs.rebuild.html also verify client library configuration is set to allowProxy="true". Also ensure the config changes are deployed into cloud. Clear dispatcher cache If needed.