The CSS and JS generated by the ui.frontend module is minified before it gets pushed into AEM. I would expect that CSS/JS generated by the ui.frontend module will be ignored by AEM's internal minification engine. I do not want to turn off AEM's minification completely as I also want clientlibraries in AEM (core components, aem grid) to be minified in production.
Actual Behaviour
CSS and JS generated by the ui.frontend module ends up getting double minified because it gets surfaced on the page as an embedded clientlibrary in the clientlib.base.
Steps to Reproduce
Vanilla config with archetype 21.
Potential Solution
A potential solution would be to include any client libraries generated by the ui.frontend module on the page by adding them separately and not as an embed via clientlib.base. This could be done by updating customheaderlibs.html or an even cleaner approach may be to add the generated ui.frontend categories as part of the template page policy:
Expected Behaviour
The CSS and JS generated by the ui.frontend module is minified before it gets pushed into AEM. I would expect that CSS/JS generated by the ui.frontend module will be ignored by AEM's internal minification engine. I do not want to turn off AEM's minification completely as I also want clientlibraries in AEM (core components, aem grid) to be minified in production.
Actual Behaviour
CSS and JS generated by the ui.frontend module ends up getting double minified because it gets surfaced on the page as an embedded clientlibrary in the clientlib.base.
Steps to Reproduce
Vanilla config with archetype 21.
Potential Solution
A potential solution would be to include any client libraries generated by the ui.frontend module on the page by adding them separately and not as an embed via clientlib.base. This could be done by updating customheaderlibs.html or an even cleaner approach may be to add the generated ui.frontend categories as part of the template page policy:
Using the template page policy means less reliance on updating the HTL scripts, see the following PR for an example: https://github.com/adobe/aem-guides-wknd/pull/23/files