Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Process of Minifying JS and CSS

ArchanaVA
Level 2
Level 2

AEM with version 6.4

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

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
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
ArpitVarshney
Community Advisor
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.

 
 

 

ArchanaVA
Level 2
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 

BrianKasingli
Correct answer by
Community Advisor
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!