From b4bd75f5fe8e1cf6202d626ee50aa8d609bbe78b Mon Sep 17 00:00:00 2001 From: Tarjei Huse Date: Sat, 22 Apr 2017 16:00:30 +0200 Subject: [PATCH] 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. --- docs/template-option.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/template-option.md b/docs/template-option.md index 6122ce1..d687789 100644 --- a/docs/template-option.md +++ b/docs/template-option.md @@ -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