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
+12-12
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The `css-loader` interprets `@import` and `url()` like `import/require()` and wi
20
20
21
21
## Getting Started
22
22
23
-
> **Warning**
23
+
> [!WARNING]
24
24
>
25
25
> To use the latest version of css-loader, webpack@5 is required
26
26
@@ -423,7 +423,7 @@ The loader replaces local selectors with unique identifiers. The chosen unique i
423
423
}
424
424
```
425
425
426
-
> **Note**
426
+
> [!NOTE]
427
427
>
428
428
> Identifiers are exported
429
429
@@ -478,7 +478,7 @@ exports.locals = {
478
478
479
479
To import a local classname from another module.
480
480
481
-
> **Note**
481
+
> [!NOTE]
482
482
>
483
483
> We strongly recommend that you specify the extension when importing a file, since it is possible to import a file with any extension and it is not known in advance which file to use.
484
484
@@ -1154,7 +1154,7 @@ Default: Depends on the value of the `esModule` option. If the value of the `esM
1154
1154
1155
1155
Enables/disables ES modules named export for locals.
1156
1156
1157
-
> **Warning**
1157
+
> [!WARNING]
1158
1158
>
1159
1159
> Because it is not allowed to use the `default` class in CSS when the `namedExport` is `true` (since ECMA modules have a reserved keyword `default` for default export), it will be automatically renamed to the `_default` class.
1160
1160
@@ -1261,7 +1261,7 @@ type exportLocalsConvention =
1261
1261
1262
1262
Default: Depends on the value of the `modules.namedExport` option, if `true` - `as-is`, otherwise `camel-case-only`.
1263
1263
1264
-
> **Warning**
1264
+
> [!WARNING]
1265
1265
>
1266
1266
> Names of locals are converted to camelcase when the named export is `false`, i.e. the `exportLocalsConvention` option has
1267
1267
> `camelCaseOnly` value by default. You can set this back to any other valid option but selectors
@@ -1823,11 +1823,11 @@ import "./styles.css";
1823
1823
1824
1824
#### `'string'`
1825
1825
1826
-
> **Warning**
1826
+
> [!WARNING]
1827
1827
>
1828
1828
> You should not use [`style-loader`](https://github.com/webpack-contrib/style-loader) or [`mini-css-extract-plugin`](https://github.com/webpack-contrib/mini-css-extract-plugin) with this value.
1829
1829
1830
-
> **Warning**
1830
+
> [!WARNING]
1831
1831
>
1832
1832
> The `esModule` option should be enabled if you want to use it with [`CSS modules`](https://github.com/webpack-contrib/css-loader#modules), by default for locals will be used [named export](https://github.com/webpack-contrib/css-loader#namedexport).
1833
1833
@@ -1858,19 +1858,19 @@ console.log(sheet);
1858
1858
1859
1859
#### `'css-style-sheet'`
1860
1860
1861
-
> **Warning**
1861
+
> [!WARNING]
1862
1862
>
1863
1863
> `@import` rules not yet allowed, more [information](https://web.dev/css-module-scripts/#@import-rules-not-yet-allowed)
1864
1864
1865
-
> **Warning**
1865
+
> [!WARNING]
1866
1866
>
1867
1867
> You don't need [`style-loader`](https://github.com/webpack-contrib/style-loader) anymore, please remove it.
1868
1868
1869
-
> **Warning**
1869
+
> [!WARNING]
1870
1870
>
1871
1871
> The `esModule` option should be enabled if you want to use it with [`CSS modules`](https://github.com/webpack-contrib/css-loader#modules), by default for locals will be used [named export](https://github.com/webpack-contrib/css-loader#namedexport).
1872
1872
1873
-
> **Warning**
1873
+
> [!WARNING]
1874
1874
>
1875
1875
> Source maps are not currently supported in `Chrome` due [bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1174094&q=CSSStyleSheet%20source%20maps&can=2)
1876
1876
@@ -1981,7 +1981,7 @@ For `production` builds it's recommended to extract the CSS from your bundle bei
1981
1981
This can be achieved by using the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin), because it creates separate css files.
1982
1982
For `development` mode (including `webpack-dev-server`) you can use [style-loader](https://github.com/webpack-contrib/style-loader), because it injects CSS into the DOM using multiple `<style></style>` and works faster.
1983
1983
1984
-
> **Note**
1984
+
> [!NOTE]
1985
1985
>
1986
1986
> Do not use `style-loader` and `mini-css-extract-plugin` together.
0 commit comments