diff --git a/migration.md b/migration.md index c61f2ea..22b4433 100644 --- a/migration.md +++ b/migration.md @@ -72,13 +72,30 @@ This also removes the `o` in template variables. ` -<%= require('partial.html'); %> +<%= require('partial.html') %> ``` +For the above example you would have to configure a [html](https://github.com/webpack/html-loader) and url/[file-loader](https://github.com/webpack/file-loader): + +```js +module: { + loaders: [ + {test: /\.png$/, loader: "file-loader"}, + { + test: /\.html$/, + exclude: /index.html$/, // you need to exclude your base template (unless you do not want this plugin own templating feature) + loader: "html" + } + ] +} +``` + +This configuration allows you to require partial html from your main `index.html` without being itself parsed by the html-loader instead of this html-webpack-plugin. + + ## Custom template engines Maybe you prefer jade or blueimp over underscore - or your project is using jade for the front end part.