Skip to content

Commit

Permalink
Doc: define lodash loader as the default loader (#789)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
nphoff authored and mastilver committed Oct 28, 2017
1 parent aedc623 commit f663339
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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
<!DOCTYPE html>
Expand Down
6 changes: 3 additions & 3 deletions docs/template-option.md
Expand Up @@ -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

Expand Down

0 comments on commit f663339

Please sign in to comment.