diff --git a/README.md b/README.md index 79fb299..0ddd558 100644 --- a/README.md +++ b/README.md @@ -450,9 +450,7 @@ module.exports = { Type: ```ts -type insert = - | string - | ((htmlElement: HTMLElement, options: Record) => void); +type insert = string; ``` Default: `head` @@ -462,9 +460,7 @@ This will cause CSS created by the loader to take priority over CSS already pres You can use other values if the standard behavior is not suitable for you, but we do not recommend doing this. If you target an [iframe](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement) make sure you have sufficient access rights, the styles will be injected into the content document head. -#### `string` - -##### `Selector` +#### `Selector` Allows to setup custom [query selector](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector) where styles inject into the DOM. @@ -491,7 +487,7 @@ module.exports = { }; ``` -##### `Absolute path to function` +#### `Absolute path to function` Allows to setup absolute path to custom function that allows to override default behavior and insert styles at any position. @@ -515,7 +511,7 @@ module.exports = { { loader: "style-loader", options: { - insert: require.resolve("modulePath"), + insert: require.resolve("./path-to-insert-module"), }, }, "css-loader", @@ -528,17 +524,32 @@ module.exports = { A new `