Skip to content

Commit 08242fb

Browse files
committed
fix typos
1 parent 750a901 commit 08242fb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ By default, the `mini-css-extract-plugin` appends styles (`<link>` elements) to
380380

381381
However in some circumstances it might be necessary to have finer control over the append target or even delay `link` elements instertion. For example this is the case when you asynchronously load styles for an application that runs inside of an iframe. In such cases `insert` can be configured to be a function or a custom selector.
382382

383-
If you target an [iframe](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement) make sure that the parent document can has sufficient access rights to reach into the frame document and append elements to it.
383+
If you target an [iframe](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement) make sure that the parent document has sufficient access rights to reach into the frame document and append elements to it.
384384

385-
#### `String`
385+
#### `insert` as a string
386386

387387
Allows to configure a [CSS selector](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector) that will be used to find the element where to append the styles (`link` elements).
388388

@@ -394,11 +394,12 @@ new MiniCssExtractPlugin({
394394

395395
A new `<link>` element will be appended to the `#my-container` element.
396396

397-
#### `Function`
397+
#### `insert` as a function
398398

399399
Allows to override default behavior and insert styles at any position.
400400

401401
> ⚠ Do not forget that this code will run in the browser alongside your application. Since not all browsers support latest ECMA features like `let`, `const`, `arrow function expression` and etc we recommend you to use only ECMA 5 features and syntax.
402+
402403
> ⚠ The `insert` function is serialized to string and passed to the plugin. This means that it won't have access to the scope of the webpack configuration module.
403404
404405
```js

0 commit comments

Comments
 (0)