コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Exclude clientlibs from AEM Minifications

Avatar

Level 1

Hi Team,

 

We are working on project where we got a situation to exclude personalized clientlibs i.e., 

etc.clientlibs/cq/personalization/clientlib/personalization/kernel.min.js from minification, so that only personalization kernel JS is not minified rest all clientlibs are minified. Could you please advise on steps to implement the ask.

 

Thanks

Seran

1 受け入れられたソリューション

Avatar

正解者
Employee Advisor

In that case I won't recommend to add jsProcessor String[] default:none, min:none to disable the minification under /lib.

 

Personally I have seen different implementation to perform minification.

Don't use the AEM OOTB minification configuration and it will disable minification process by default and it won't touch /libs/cq/personalization/clientlib/personalization/kernel.

Then use --style=compressed during npm build in package.json file (if you have) where you need  minification.

 

Frontend team was following this approach in my last project. 

 

Please talk to your architect and Front team and explain everything.

元の投稿で解決策を見る

3 返信

Avatar

Employee Advisor

In that case please refer Disable Minfication for specific client libraries: in https://www.albinsblog.com/2019/04/how-to-disable-minification-for-client-libraries-in-aem.html#.YoI.... I did the same thing in my last project on specific client lib.

 

Here you could see I did for css -

 

DEBAL_DAS_0-1652706736076.png

 

Avatar

Level 1

Hi @DEBAL_DAS ,

 

Thanks for your quick response, I want to apply the changes to personalization library under /lib too. Could you please advise if there is other solution or can leverge this solution to personalization libraries under /lib.

 

Thanks

Seran

Avatar

正解者
Employee Advisor

In that case I won't recommend to add jsProcessor String[] default:none, min:none to disable the minification under /lib.

 

Personally I have seen different implementation to perform minification.

Don't use the AEM OOTB minification configuration and it will disable minification process by default and it won't touch /libs/cq/personalization/clientlib/personalization/kernel.

Then use --style=compressed during npm build in package.json file (if you have) where you need  minification.

 

Frontend team was following this approach in my last project. 

 

Please talk to your architect and Front team and explain everything.