Open dev-bjoern opened 5 years ago
I've been noodling with something like this in a local fork and would be happy to take it on.
The savings are not astronomical - especially considering how good gzip is at removing empty strings, but there are savings when loading the files for SSR and some of the boilerplate in the compiled templates is reduced.
@chickenwing I have a PR here against the handlebars-loader: https://github.com/pcardune/handlebars-loader/pull/177
I think I may change it so that you can pass the options for html-minifier where handlebars-loader is configured in the implementor's webpack configuration so that the loader isn't dictating the kind of compression settings the project may be looking for.
I would like to propose an option/feature allowing to process the returned template(string). I need it to remove white space, empty lines and tabs from the compiled template. A similar option is already present in the grunt plugin via "processContent".
I would use it e.g. like so:
Anything like this possible?