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
@@ -103,27 +102,6 @@ It's useful when you, for instance, need to post process the CSS as a string.
103
102
|**[`camelCase`](#camelcase)**|`{Boolean\|String}`|`false`|Export Classnames in CamelCase|
104
103
|**[`importLoaders`](#importloaders)**|`{Number}`|`0`|Number of loaders applied before CSS loader|
105
104
106
-
### `root`
107
-
108
-
For URLs that start with a `/`, the default behavior is to not translate them.
109
-
110
-
`url(/image.png) => url(/image.png)`
111
-
112
-
If a `root` query parameter is set, however, it will be prepended to the URL
113
-
and then translated.
114
-
115
-
**webpack.config.js**
116
-
```js
117
-
{
118
-
loader:'css-loader',
119
-
options: { root:'.' }
120
-
}
121
-
```
122
-
123
-
`url(/image.png)` => `require('./image.png')`
124
-
125
-
Using 'Root-relative' urls is not recommended. You should only use it for legacy CSS files.
126
-
127
105
### `url`
128
106
129
107
To disable `url()` resolving by `css-loader` set the option to `false`.
@@ -400,37 +378,8 @@ module.exports = {
400
378
401
379
### Extract
402
380
403
-
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 [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) to extract the CSS when running in production mode.
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.
382
+
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.
0 commit comments