Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

AEM & Dynamic import : can't find resources in clientlib

Avatar

Level 1

Hello everyone,

i'm trying to bring the dynamic imports in our AEM projects. I do see the file being built correctly, the chunks are under a clientlib named dynamic module, under the clientlibs folder, within ui.apps.

I do also see it replicated on my local environ in CRX

Screenshot from 2023-06-15 09-34-24.pngScreenshot from 2023-06-15 09-34-46.png

However, when accessing the page that loads those chunks, i got a 404 on the chunks ( 890.js or 980.js )

Screenshot from 2023-06-15 09-37-19.png

For all intents and purpose, it should work. The path is right, it looks like other clientlib path we are loading on the page, etc.clientlibs/<PROJECT>/clientlibs/<CLIENTLIB>. Im seeing this locally, im on an author environnement and do not goes through a dispatcher

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @jeanjak 

 

Did you tried clearing the clientlib cache?

 

If you made changes to the clientlib configuration or folder structure, it's possible that the clientlib cache is causing issues. Try clearing the AEM clientlib cache by navigating to the following URL in your AEM author environment: http://localhost:4502/libs/granite/ui/content/dumplibs.html. Select the appropriate clientlib and click "Clear" to clear the cache.

View solution in original post

2 Replies

Avatar

Community Advisor

how did you generate the chunks? can you explore in your browser tools if the resources are appended in the "sources" tab?



Esteban Bustamante

Avatar

Correct answer by
Community Advisor

Hello @jeanjak 

 

Did you tried clearing the clientlib cache?

 

If you made changes to the clientlib configuration or folder structure, it's possible that the clientlib cache is causing issues. Try clearing the AEM clientlib cache by navigating to the following URL in your AEM author environment: http://localhost:4502/libs/granite/ui/content/dumplibs.html. Select the appropriate clientlib and click "Clear" to clear the cache.