Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Clarify limitations with mini-css-extract-plugin & initial chunks
  • Loading branch information
jdelStrother authored Aug 13, 2021
commit 6b363f05a3f5f60a1072d250638ff3ec3a9d0284
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,23 @@ module.exports = {
};
```

### ⚠ CSS is not loaded from initial chunks.

Note that if you import CSS from your webpack entrypoint (in the initial chunk), `mini-css-extract-plugin` will not load this CSS into the page. `html-webpack-plugin` usually loads this CSS for you, but if you're not using that plugin, you'll need to use a dynamic `import()` to force the CSS to be split into a separate chunk. Either of the following would work:

**component.js**

```js
import("./style.css");
```

**app.js**

```js
import("./component");
```


## Options

### Plugin Options
Expand Down