From e3325b86f229c96a67484e28c30ab54365bb2832 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Wed, 11 Mar 2015 11:41:43 +0100 Subject: [PATCH] Update readme --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 335609e..21a5c2e 100644 --- a/README.md +++ b/README.md @@ -113,10 +113,10 @@ HTML as well as the body. Your template might look like this: My App - + - + ``` @@ -153,14 +153,24 @@ Note the plugin will throw an error if you specify both `template` _and_ The `o` variable in the template is the data that is passed in when the template is rendered. This variable has the following attributes: - `htmlWebpackPlugin`: data specific to this plugin - - `htmlWebpackPlugin.assets`: a massaged representation of the + - `htmlWebpackPlugin.files`: a massaged representation of the `assetsByChunkName` attribute of webpack's [stats](https://github.com/webpack/docs/wiki/node.js-api#stats) object. It contains a mapping from entry point name to the bundle filename, eg: ```json "htmlWebpackPlugin": { - "assets": { - "head": "assets/head_bundle.js", - "main": "assets/main_bundle.js" + "files": { + "css": [ "main.css" ], + "js": [ "assets/head_bundle.js", "assets/main_bundle.js"] + "chunks": { + "head": { + "entry": "assets/head_bundle.js", + "css": [ "main.css" ] + }, + "main": { + "entry": "assets/main_bundle.js", + "css": [] + }, + } } } ```