Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 0639652

Browse files
wclrbrunocodutra
authored andcommitted
Improve example code (#176)
Improve example code for `Handling Multiple HTML Files`
1 parent 3eafd87 commit 0639652

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ plugins: [
185185
```javascript
186186
const WebappWebpackPlugin = require('webapp-webpack-plugin')
187187
const HtmlWebpackPlugin = require('html-webpack-plugin')
188+
const { basename } = require('path')
188189

189190
...
190191

@@ -199,7 +200,8 @@ plugins: [
199200
}),
200201
new WebappWebpackPlugin({
201202
logo: 'logo.svg',
202-
inject: htmlPlugin => htmlPlugin.options.filename === 'a.html',
203+
inject: htmlPlugin =>
204+
basename(htmlPlugin.options.filename) === 'a.html',
203205
}),
204206
],
205207
```

0 commit comments

Comments
 (0)