Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Minify HTML and JS.

Avatar

Level 1

Hi,

We are extending the angular application.

Is there a way to minify the .template.html files generated in AEM?

Also we would like to see if it's possible to minify the app-module and app-controller files. Currently we are unable to use clientlibs the way our implementation is and as per my understanding the "Granite HTML Library manager" only works for clientlibs.

Thanks for your help.

1 Accepted Solution

Avatar

Correct answer by
Employee

If want to minify HTML-files then you need to use a module is the webserver, this is not possible via AEM.

View solution in original post

4 Replies

Avatar

Administrator

What is the use-case of minifying template.html?

And yes, you are correct that Adobe Granite UI Clientlibs is to provide services for the packaging of collections of CSS and JavaScript as client libraries. ScriptProcessor processes a script by minifying, obfuscating etc. ScriptTransformer is an extension to the script processor which operates on script collections.

Link:- http://www.aemquickstart.in/2016/04/enable-js-and-css-minification.html

~kautuk



Kautuk Sahni

Avatar

Correct answer by
Employee

If want to minify HTML-files then you need to use a module is the webserver, this is not possible via AEM.

Avatar

Level 1

Thanks for your response Feike and Kautuk.
Could you please elaborate on "module in the webserver" ?

Avatar

Employee

You can use something like mod_pagespeed module for Apache.