From a195c3441a79f5ad12d524f09759d9baf764d1c7 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Thu, 2 Jan 2020 11:24:01 +0100 Subject: [PATCH] docs: Update template-option documentation --- docs/template-option.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/template-option.md b/docs/template-option.md index ac2b56b7..9df73e1b 100644 --- a/docs/template-option.md +++ b/docs/template-option.md @@ -2,7 +2,7 @@ ## History -The version 2.x which was introduced last year (Sep, 2015) changed the way the template is processed. +The version 2.x which was introduced 2015 changed the way the template is processed. Instead of forcing all users to use the [blueimp](https://github.com/blueimp/JavaScript-Templates) template engine it allowed to use any webpack loader: * [pug](https://github.com/pugjs/pug-loader) @@ -19,7 +19,8 @@ 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 lodash 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 ejs loader](https://github.com/jantimon/html-webpack-plugin/blob/master/lib/loader.js) kicks in. +Please note that this loader does not support the full ejs syntax as it is based of [lodash template](https://lodash.com/docs/#template). ```js { @@ -37,8 +38,8 @@ Be aware, using `.html` as your template extention may unexpectedly trigger anot ```js new HtmlWebpackPlugin({ - // For details on `!!` see https://webpack.github.io/docs/loaders.html#loader-order - template: '!!handlebars!src/index.hbs' + // For details on `!!` see https://webpack.js.org/concepts/loaders/#inline + template: '!!handlebars-loader!src/index.hbs' }) ``` @@ -63,7 +64,7 @@ new HtmlWebpackPlugin({ ``` However this also means that in the following example webpack will use the [html loader for your template](https://webpack.js.org/loaders/html-loader/). -This will **cause html minification** and it will also **disable the ejs fallback** loader. +This will **cause html minification** and it will also **disable the ejs/lodash fallback** loader. ```js {