Skip to content

Decide what to do with the HTML minification feature #1036

Closed
@edmorley

Description

@edmorley

Is your feature request related to a problem? Please describe.
html-webpack-plugin has a minify option that provides support for minifying the generated HTML.

However:

  • it currently defaults to off (false) so unless people manually enable it, isn't used
  • it adds 14 transitive dependencies (according to cost-of-modules)
  • there are other plugins out there for HTML minification (for example html-minifier-webpack-plugin
    ) in case people do want to minify
  • the win from minifying HTML is minimal, since most of the possible optimisations can (and IMO should) really be made to the original template - making it easier to track down any possible regressions that result
  • the current implementation in html-webpack-plugin has some issues (eg Uglify fails silently when passed in incorrect options #743)

Describe the solution you'd like
For the minify feature and the dependency on the html-minifier package to be removed in the next major version of html-webpack-plugin (ie v4 on the webpack-4 branch).

This idea was previously mentioned in #558 and #452.

Describe alternatives you've considered
Leaving the html-minifier dependency as-is in v4.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions