You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+34
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,7 @@ Allowed values are as follows
147
147
|**`inject`**|`{Boolean\|String}`|`true`|`true \|\| 'head' \|\| 'body' \|\| false` Inject all assets into the given `template` or `templateContent`. When passing `true` or `'body'` all javascript resources will be placed at the bottom of the body element. `'head'` will place the scripts in the head element|
148
148
|**`favicon`**|`{String}`|``|Adds the given favicon path to the output HTML|
149
149
|**`meta`**|`{Object}`|`{}`|Allows to inject `meta`-tags. E.g. `meta: {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'}`|
150
+
|**`base`**|`{Object\|String\|false}`|`false`|Inject a [`base`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) tag. E.g. `base: "https://example.com/path/page.html`|
150
151
|**`minify`**|`{Boolean\|Object}`|`true` if `mode` is `'production'`, otherwise `false`|Controls if and in what ways the output should be minified. See [minification](#minification) below for more details.|
151
152
|**`hash`**|`{Boolean}`|`false`|If `true` then append a unique `webpack` compilation hash to all included scripts and CSS files. This is useful for cache busting|
152
153
|**`cache`**|`{Boolean}`|`true`|Emit the file only if it was changed|
@@ -387,6 +388,39 @@ plugins: [
387
388
]
388
389
```
389
390
391
+
### Base Tag
392
+
393
+
When the `base` option is used,
394
+
html-webpack-plugin will inject a [base tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base).
395
+
By default, a base tag will not be injected.
396
+
397
+
The following two are identical and will both insert `<base href="http://example.com/some/page.html">`:
0 commit comments