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

Why is the default of removeOptionalTags set to true? #40

Closed
jantimon opened this issue Dec 1, 2015 · 2 comments
Closed

Why is the default of removeOptionalTags set to true? #40

jantimon opened this issue Dec 1, 2015 · 2 comments

Comments

@jantimon
Copy link

jantimon commented Dec 1, 2015

According to http://perfectionkills.com/experimenting-with-html-minifier/#remove_optional_tags this feature might change the behaviour of the result.
This also caused jantimon/html-webpack-plugin#128

Why do you remove HTML, BODY and HEAD?

chrisnicola added a commit to chrisnicola/html-loader that referenced this issue Dec 17, 2015
I've reviewed a few sources and tried to put a safe set of minification defaults 
that will not break common use cases such as some javascript and CSS use cases.
 I've used a subset of the "safe" options [from here](https://kangax.github.io/html-minifier/).

 Options not used are:

- Remove redundant attributes (can break styles/JS)
- Remove empty attributes (can break styles/JS)
- Remove empty elements (if the empty tag is indeed unintended it should be removed from the original)
- Minify URLs (seems like it should be at the users discretion to rewrite absolute URLs)

This addresses a number of issues: webpack-contrib#40, webpack-contrib#38.
@jantimon
Copy link
Author

Thanks @chrisnicola that looks promising 👍

@joshwiens
Copy link
Member

@hemanth - Also resolved with #43 Close me

@hemanth hemanth closed this as completed Jul 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants