Minify HTML and JS. | Community
Skip to main content
taniks26682425
August 22, 2017
Solved

Minify HTML and JS.

  • August 22, 2017
  • 4 replies
  • 2291 views

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.
Best answer by Feike_Visser1

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

4 replies

kautuk_sahni
Community Manager
Community Manager
August 23, 2017

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
Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
August 23, 2017

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

taniks26682425
August 23, 2017

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

Feike_Visser1
Adobe Employee
Adobe Employee
August 24, 2017

You can use something like mod_pagespeed module for Apache.