Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML minification #3459

Closed
mattdistefano opened this issue Dec 8, 2016 · 6 comments
Closed

HTML minification #3459

mattdistefano opened this issue Dec 8, 2016 · 6 comments

Comments

@mattdistefano
Copy link

Trying to track down some build size issues and at first glance it seems like there's no HTML minification being performed even in a prod build. I'm guessing this was either never in place or was lost with the removal of html-loader. What's the roadmap here? Is the AOT compiler supposed to handle this somehow? If not, can we add a loader that at least does the minification?

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.22-1
node: 6.9.1
os: win32 x64

@mattdistefano
Copy link
Author

Benchmarked this on my own project.

With AOT - my main bundle was around 606kb without html minification and 602kb with.
Without AOT - my main bundle was around 263kb without html minification and 255kb with.

Numbers are for the pre-gzip prod files. I imagine the gzip reduces the difference further.

@hansl
Copy link
Contributor

hansl commented Dec 8, 2016

We are discussing using html-loader again, but there are other issues that arise when using it.

Closing this as a dupe of #3415

@hansl hansl closed this as completed Dec 8, 2016
@mattdistefano
Copy link
Author

mattdistefano commented Dec 8, 2016

@hansl Personally I'd like to see this left open unless you want to change #3415 to a general "Fix what we lost by removing html-loader" ticket. Yeah, html-loader does both html minification and image fingerprinting, but otherwise there's no relation between the two feature requests - you can have html minification without fingerprinting and fingerprinting without minification.

@hansl
Copy link
Contributor

hansl commented Dec 8, 2016

We will not do html minification unless we implement html-loader, so they're related.

@mattdistefano
Copy link
Author

What's the reasoning for that? It shouldn't be difficult to create a loader that only does html minification if you decide html-loader has too much other baggage to deal with.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants