What is the best practice- Clientlibs( minify) or Webpack

Avatar

Avatar
Ignite 1
Level 1
sunily21159739
Level 1

Likes

2 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
Boost 1
View profile

Avatar
Ignite 1
Level 1
sunily21159739
Level 1

Likes

2 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
Boost 1
View profile
sunily21159739
Level 1

23-09-2020

Hi All,

 

What is the best practice to minify JS/CSS file in AEM6.4.2.

In our case there there two applications are running on same AEM instances and one of the application(First) is not using AEM minification  that's why they have disabled "minify" option on configuration level. They( First Application) want to use WebPack to minify JS/CSS because some of the pages of there application is breaking by using AEM minify option.

 But in our application( second) AEM minify is working fine. Just want to check what is the best practice here, do I need to implement WebPack also in my application( second) or can I continue with AEM minify option(CQ Html Library Manager).

 

Regards,

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
raj_mandalapu
MVP

Likes

125 likes

Total Posts

203 posts

Correct reply

72 solutions
Top badges earned
Validate 1
Contributor
Shape 1
Give Back 5
Give Back 3
View profile
raj_mandalapu
MVP

23-09-2020

You can continue with AEM minify option, but the problem I see here is, if AEM is not properly minified your JS due to some issues in js files then there are chances to get production defects that are related to JS, if any issue occurs either in prod or lower environments related to this then you need to spend some amount of time to identify the issue, I feel it is waste of time. 

 

Another approach is, you can ask front end people to minify the JS before adding into the clientlibs. With the tools/plugins currently available in the market for front end people this is not a big task, for them, it is just one additional step.

 

Answers (2)

Answers (2)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,322 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,322 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

24-09-2020

If AEM minification works you can reply on AEM minify.

The other project can disabled clientlibs minification by using project specific configs
eg. https://www.albinsblog.com/2019/04/how-to-disable-minification-for-client-libraries-in-aem.html

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,166 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,166 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

23-09-2020

To be coherent, I would unify the way your frontend is created. Personally I am not in favor of any (I don't build frontends), but as one part is already using webpack, I would think that switching the part also to webpack isn't that hard (you already have some experience in your team how it works).