nateyolles / aem-clientlib-async

Create AEM clientlibs that can output 'async', 'defer' and 'onload' attributes on your HTML script elements.
http://www.nateyolles.com/blog/2016/06/custom-aem-html5-async-clientlibs
Apache License 2.0
49 stars 23 forks source link

Imcompatible with ACS Commons Versioned Clientlibs feature #6

Closed fernandohu closed 5 years ago

fernandohu commented 5 years ago

I am working on a project that uses your code and I found a problem.

It is not possible to use the Versioned Clientlib feature of ACS Commons.

The version hashes are not appended to the end of the JS and CSS urls.

fernandohu commented 5 years ago

Hi. I found a solution for this, that is described in this page: https://forums.adobe.com/thread/2613261

In summary, you have to add the type attribute to CSS and JS import. You can do that in the ClientLibUseObject.java java file. If you do that, the Versioned Clientlibs feature will work correctly.

nateyolles commented 5 years ago

We've added the type attribute for both the script and the link elements. Thank you @fernandohu.