From f6633391a281378a3fcd973165a4b0b72b8850c1 Mon Sep 17 00:00:00 2001 From: Nathan Hoffman Date: Sat, 28 Oct 2017 17:34:50 -0400 Subject: [PATCH] Doc: define lodash loader as the default loader (#789) * Update readme to no longer reference ejs by default ejs is not the default template language, it's lodash, and it should be marked as such. * update template-option.md to reference lodash Previously was ejs, which was not what the default loader was. --- README.md | 4 ++-- docs/template-option.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4e2d27bd..2ad99e5b 100644 --- a/README.md +++ b/README.md @@ -156,12 +156,12 @@ and favicon files into the markup. plugins: [ new HtmlWebpackPlugin({ title: 'Custom template', - template: 'my-index.ejs', // Load a custom template (ejs by default see the FAQ for details) + template: 'my-index.html', // Load a custom template (lodash by default see the FAQ for details) }) ] ``` -`my-index.ejs`: +`my-index.html`: ```html diff --git a/docs/template-option.md b/docs/template-option.md index 6e12c8ce..eedd3624 100644 --- a/docs/template-option.md +++ b/docs/template-option.md @@ -19,18 +19,18 @@ There are three ways to set the loader: ## 1) Don't set any 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. +By default (if you don't specify any loader in any way) a [fallback lodash loader](https://github.com/ampedandwired/html-webpack-plugin/blob/master/lib/loader.js) kicks in. ```js { plugins: [ new HtmlWebpackPlugin({ - template: 'src/index.ejs' + template: 'src/index.html' }) ] } ``` -It is a good idea to use `.ejs` instead of `.html` so you do not unexpectedly trigger another loader. +Be aware, using `.html` as your template extention may unexpectedly trigger another loader. ## 2) Setting a loader directly for the template