Skip to content

Instantly share code, notes, and snippets.

@stalniy
Created July 25, 2016 11:27
Show Gist options
  • Save stalniy/d55fc7990b4340c9d0ef55fd8838ed34 to your computer and use it in GitHub Desktop.
Save stalniy/d55fc7990b4340c9d0ef55fd8838ed34 to your computer and use it in GitHub Desktop.
Configuration for webpack html loader which removes all white spaces between tags
{
root: resolve('src'),
minimize: true,
collapseWhitespace: true,
conservativeCollapse: false,
collapseInlineTagWhitespace: true,
removeAttributeQuotes: false,
caseSensitive: true,
customAttrSurround: [
[/#/, /(?:)/],
[/\*/, /(?:)/],
[/\[?\(?/, /(?:)/],
],
customAttrAssign: [/\)?\]?=/],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment