Expand my Community achievements bar.

SOLVED

Process of Minifying JS and CSS

Avatar

Level 2

AEM with version 6.4

What is the process of minifying the js and css inside the clientlibs folder

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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!

View solution in original post

6 Replies

Avatar

Community Advisor

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.
 

Screenshot (1).png

 

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

 
 

 

Avatar

Level 2

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 

Avatar

Correct answer by
Community Advisor

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!