If you want this feature from OOTB AEM? - Not supportedBut you can follow approach mentioned here for these attributesGitHub - nateyolles/aem-clientlib-async: Create AEM clientlibs that can output 'async', 'defer' and 'onload' attributes … https://github.com/nateyolles/aem-clientlib-async