Minify HTML and JS. | Community
Skip to main content
taniks26682425
New Participant
Aug 22, 2017 5:56 PM UTC
Solved

Minify HTML and JS.

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Feike_Visser1
Feike_Visser1Accepted solution
Employee
Aug 23, 2017 9:08 AM UTC

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

4 replies

Feike_Visser1
Employee
Aug 24, 2017 6:51 AM UTC

You can use something like mod_pagespeed module for Apache.

Translate
taniks26682425
New Participant
Aug 23, 2017 7:28 PM UTC

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

Translate
Feike_Visser1
Feike_Visser1Accepted solution
Employee
Aug 23, 2017 9:08 AM UTC

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

Translate
kautuk_sahni
Employee
Aug 23, 2017 8:41 AM UTC

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

Translate
Kautuk Sahni