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

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

JonMaguire
Level 2
Level 2

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
Nikhil-Kumar
Correct answer by
Community Advisor
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

5 Replies
Nikhil-Kumar
Correct answer by
Community Advisor
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

JonMaguire
Level 2
Level 2
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?
Nikhil-Kumar
Community Advisor
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.
Nikhil-Kumar
Community Advisor
Community Advisor
You can update in configuration file inside the react-app folder’s config.js.
JonMaguire
Level 2
Level 2

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.

Nikhil-Kumar
Community Advisor
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.
Nikhil-Kumar
Community Advisor
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