Process of Minifying JS and CSS | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
BrianKasingli
BrianKasingliAccepted solution
New Participant
Feb 24, 2020 8:29 PM UTC

Hey @archanava,

Other than the HTML Library Manager OSGi configuration (video tutorial), where the AEM publish instance will be doing the work to minification to CSS and JS, you can also try minifying your CSS and JS assets in the Apache webserver; utilising the Apache PageSpeed module, (installation documentation).

I hope this helps!

6 replies

BrianKasingli
BrianKasingliAccepted solution
New Participant
Feb 24, 2020 8:29 PM UTC

Hey @archanava,

Other than the HTML Library Manager OSGi configuration (video tutorial), where the AEM publish instance will be doing the work to minification to CSS and JS, you can also try minifying your CSS and JS assets in the Apache webserver; utilising the Apache PageSpeed module, (installation documentation).

I hope this helps!

Translate
sunjot16
Employee
Feb 24, 2020 7:51 PM UTC

The following document may be helpful:

https://helpx.adobe.com/ca/experience-manager/6-4/sites/developing/using/clientlibs.html#UsingPreprocessors

 

Try rebuilding the clientlibs via File System, as per: https://helpx.adobe.com/ca/experience-manager/kb/How-to-force-a-recompilation-of-all-Sling-scripts-jsps-java-sightly-on-AEM-6-4.html

 

* Moreover, what kind of errors do you see in the error.log file?

Translate
ArpitVarshney
New Participant
Feb 24, 2020 7:44 AM UTC

Hi @archanava 

 

Please do the below steps:

  1. Please go to OSGi configuration console and search for Adobe Granite HTML Library Manager configuration.
  2. Open the configuration and make sure that minify field  is checked for the environment.
 

 

Please make sure this configuration has been added via code in your development environments.

 
 

 

Translate
ArchanaVAAuthor
Level 2
Feb 24, 2020 12:40 PM UTC

Thanks @arpitvarshney 
 I have enabled the minify and also include jsProcessor in xml file of ClientLibrary

jsProcessor="[default:none,min:gcc;languageIn=ECMASCRIPT_2015;compilationLevel=whitespace]"

When I build in console Im facing JS errors 

Translate