Skip to content

Minify index.html on build --prod #1861

Closed

Description

  1. Any project, run ng build --prod

It does not minify index.html

Activity

  1. added
    P5The team acknowledges the request but does not plan to address it, it remains open for discussion
    on Sep 20, 2016
  2. vitthalr commented on Jan 4, 2017

    @vitthalr

    Any update on this?

  3. Fajkowsky commented on Feb 23, 2017

    @Fajkowsky

    Is there chance to minify html?

  4. self-assigned this
    on May 22, 2017
  5. added a commit that references this issue on Jun 7, 2017
    3ca18b4
  6. e-oz commented on Jun 12, 2017

    @e-oz

    Please add an option to turn off HTML minification. Or, at least, whitespace collapsing.

  7. alexciesielski commented on Jun 12, 2017

    @alexciesielski

    Does this minify all angular templates or just index.html?

  8. filipesilva commented on Jun 12, 2017

    @filipesilva
    Contributor

    @e-oz is this change breaking something in your project? Can you open a new issue with a description of what's happening please?

    @ciesielskico just index.html minification.

  9. e-oz commented on Jun 12, 2017

    @e-oz
  10. added a commit that references this issue on Apr 23, 2018
    2e7eb6f
  11. jkevingutierrez commented on May 19, 2018

    @jkevingutierrez

    Why this issue was closed? Is there any option to minify index.html? It would be great to have an option like "extractCss" to enabled/disabled minify index.html

  12. odahcam commented on Jan 8, 2019

    @odahcam

    It was closed because of this commit 75311c2

  13. RinMinase commented on Feb 7, 2019

    @RinMinase

    @odahcam This feature was removed on Angular 6+ based on the comments noted on the commit you have linked.

    So index.html file in Angular 6+ is still not minified. I am currently using Angular v7.2.4, and index.html on --prod does not minify it.

  14. odahcam commented on Feb 8, 2019

    @odahcam

    Absolutely right, I read the comments too, I just wanted to give a direct and simple answer to the previous comment. Maybe this issue should be reopened.

  15. alaboudi commented on May 14, 2019

    @alaboudi

    @odahcam I agree. It should be.

    @filipesilva thoughts?

  16. MilesBHuff commented on Feb 13, 2020

    @MilesBHuff

    #11360 is the same issue, and it's still open, in case you guys want to move there.

  17. MilanObrenovic commented on May 25, 2020

    @MilanObrenovic

    Any updates on this?

  18. angular-automatic-lock-bot commented on Jun 3, 2021

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  19. locked and limited conversation to collaborators on Jun 3, 2021
  20. added a commit that references this issue on May 29, 2026
    273b462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P5The team acknowledges the request but does not plan to address it, it remains open for discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions