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
+5-33
Original file line number
Diff line number
Diff line change
@@ -50,10 +50,6 @@ module.exports = {
50
50
};
51
51
```
52
52
53
-
**Only for webpack v4:**
54
-
55
-
Good loaders for requiring your assets are the [file-loader](https://github.com/webpack/file-loader) and the [url-loader](https://github.com/webpack/url-loader) which you should specify in your config (see [below](https://github.com/webpack-contrib/css-loader#assets)).
56
-
57
53
And run `webpack` via your preferred method.
58
54
59
55
### `toString`
@@ -1243,29 +1239,13 @@ module.exports = {
1243
1239
};
1244
1240
```
1245
1241
1246
-
**For webpack v4:**
1242
+
### Extract
1247
1243
1248
-
**webpack.config.js**
1244
+
For production builds it's recommended to extract the CSS from your bundle being able to use parallel loading of CSS/JS resources later on.
- This can be achieved by using the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract the CSS when running in production mode.
1247
+
1248
+
- As an alternative, if seeking better development performance and css outputs that mimic production. [extract-css-chunks-webpack-plugin](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin) offers a hot module reload friendly, extended version of mini-css-extract-plugin. HMR real CSS files in dev, works like mini-css in non-dev
1269
1249
1270
1250
### Pure CSS, CSS modules and PostCSS
1271
1251
@@ -1308,14 +1288,6 @@ module.exports = {
1308
1288
// More information here https://webpack.js.org/guides/asset-modules/
0 commit comments