How to add async to the clientlibs that are added from the template's page policy.
Hi everyone,
instance: Aem-cloud.
I’m using the Core Page Component v2 (core/wcm/components/page/v2/page) as the supertype for my page component. The client libraries are being included through the Template Page Policy (Design dialog → Page Policy → Client Libraries).
currently rendered as:
<script src="/etc.clientlibs/testProj/clientlibs/clientlib-site.lc-232230oi9i39i23293i39-lc.min.js"></script>
Expected:
<script async src="/etc.clientlibs/testProj/clientlibs/clientlib-site.lc-232230oi9i39i23293i39-lc.min.js"></script>
Question:
Is there any recommended way to add the async or defer attribute to these clientlibs.
Can this be achieved via HTL override, or any other approach?
Any suggestions or best practices would be appreciated.