Make example more explicit about filename (#649)

I lost half a day because I also had a file loader for .html and somehow the output got garbled.
This commit is contained in:
Tarjei Huse 2017-04-22 16:00:30 +02:00 committed by Jan Nicklas
parent b8fd1427bc
commit b4bd75f5fe
1 changed files with 11 additions and 0 deletions

View File

@ -21,6 +21,17 @@ There are three ways to set the loader:
By default (if you don't specify any loader in any way) a [fallback ejs loader](https://github.com/ampedandwired/html-webpack-plugin/blob/master/lib/loader.js) kicks in.
```js
{
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.ejs'
})
]
}
```
It is a good idea to use `.ejs` instead of `.html` so you do not unexpectedly trigger another loader.
## 2) Setting a loader directly for the template
```js