Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

ui.frontend: Why are clientlib-dependencies and clientlib-sites ignored?

Avatar

Level 3

When using the ui.frontend project, why are clientlib-dependencies and clientlib-sites ignored in Git. Don't these folders and the code within them need to be part of version control?  

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@JonMaguire 

As per my understanding these clientlibs are created when code is built and deployed and it's content mostly varies on build.
It's something like Node Modules in react which is never committed in GIT and is a part of build of build process.

So, if this is the case I think there is any need to commit it as part of the code in Git.


Thanks,
Nikhil

View solution in original post

7 Replies

Avatar

Correct answer by
Community Advisor

@JonMaguire 

As per my understanding these clientlibs are created when code is built and deployed and it's content mostly varies on build.
It's something like Node Modules in react which is never committed in GIT and is a part of build of build process.

So, if this is the case I think there is any need to commit it as part of the code in Git.


Thanks,
Nikhil

Avatar

Level 3
Thanks, that sort of makes sense on how it works, it being generated in the build, I'm just not sure of the reasoning behind it. For a follow-up question, do you happen to know if there is a way to turn off the minification of the css and js files generated through the ui.frontend process? This makes debugging through CRX easier in integration and QA author environments. I assume we would have to modify the webpack.prod.js or maybe another file to accomplish this?

Avatar

Community Advisor
You can create your own clientlib and add its category as part of editable templates policy and add this clientlib as dependency to the existing react app’s clientlib.

Avatar

Community Advisor
You can update in configuration file inside the react-app folder’s config.js.

Avatar

Level 3

Thanks, but my app is not React. I understand being able to add clientlibs as dependencies to templates. My team wants to be able to see the generated css in a human-readable format. For instance site.css within clientlib-site.

Avatar

Community Advisor
Then you should update the config file which is minifying it. And the clientlibs that you mentioned above are the OOTB generated clientlibs. If you want add any further code customisation, I suggest you to go ahead with creating a new clientlib.

Avatar

Community Advisor

@JonMaguire 

Refer the below link of latest archetype where the clientlibs clientlib-dependencies and clientlib-site inside ui.frontend.general in clientlib.config.js file.
If you don't have ui.frontend.general then look inside ui.frontend.

https://github.com/adobe/aem-project-archetype/blob/master/src/main/archetype/ui.frontend.general/cl...

I am not sure we can customize it's functionality or not.

Hope this helps!!


Thanks,
Nikhil