Hi, i'm struggling with this, i created a custom component called swcarousel and i'm trying to use a JS file with some functions that are used to change from image to image, the JS file is placed in the path
but it still not working, someone has an idea how these JS files are used from there.
P.D Im need to do it from there and not from clientlibs for this component, and the SCSS file placed in the same path works
Solved! Go to Solution.
A couple of questions here:
Are the clientlibs getting generated for the component?
Did you add the client-libs in the HTL for the component?
Check this for reference: https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetyp...
Do you have a set up where your js and css under "ui.frontend/src/main/webpack/components" are created under "/apps/project/clientlibs/uife(custom folder)/clientlib-carouselcomp"
This is configured at 'clientlib.config.js' I think. See https://github.com/adobe/aem-guides-wknd/blob/main/ui.frontend/clientlib.config.js
Just wanted to make sure this is working well. And if you have the clientlib generated under /apps then that clientlib category should be included in template that includes the carousel component (or the component html it self) for the desired css or js to load.
Hope this helps.