webpack/html-loader — pull request #5 by fernandoacorreia (2014-01-29 14:40:24+00:00)
Title: Document how to minimize

After looking at the loader README, the webpack documentation and the loader source code and tests, I still couldn't figure out how to have the required content minimized.

I have a file like this:

```

#{field1} {field2}

{field3}

{field4}

{field5}

```

And I require it like this:

```
var x = require('html!templates/myfile.html');
```

After running webpack:

```
$ webpack --optimize-minimize
```

The bundled JavaScript code itself is minimized, but the required HTML contents is not. It looks like this:

```
e.exports='\n
\n \n

#{field1} {field2}

\n

{field3}

\n {field4}\n

{field5}

\n \n
\n'
```

I'm probably using it wrong, but it would really be nice to have a more detailed documentation on how to use this loader and get the HTML contents minimized.