Menu

How to recompile clientlibs in AEM?

Go to http://localhost:4502/libs/granite/ui/content/dumplibs.rebuild.html

Here you will see two buttons. As shown in below screenshot.

1. Invalidate cache

2. Rebuild Libraries

How to invalidate cache in AEM
Invalidate cache in AEM



Invalidate cache

Invalidate cache option is to invalidate the cahe from AEM. Once you will click on this button you will see a success or failure message on the same page. Below is the screenshot of successful invalidation.



Rebuild Client Libraries

Rebuild clientlibs will be rebuild the entire client library of AEM. After successful rebuild you would see the below screen. 

Rebuild AEM clientlibs
How to rebuild AEM client libraries
Rebuild AEM client Libraries



How to map AEM component with SPA React/Angular component

MapTo function is provided by the AEM SPA Editor JS SDK (@adobe/aem-react-editable-components). The AEM component path /apps/jorvee/components/text represents the sling:resourceType of the AEM component. This path gets matched with the :type exposed by the JSON model observed earlier. MapTo takes care of parsing the JSON model response and passing the correct values as props to the SPA component.

MapTo('jorvee/components/text')(Text, TextEditConfig);

Above MapTo function will map your AEM Text component with SPA Text component. The complete line will be like this with export keyword.

export default MapTo('wknd-spa-react/components/text')(Text, TextEditConfig);


Reference

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/spa-editor/react/map-components.html?lang=en 

AEM with React component MapTo function
Map AEM with React component