Skip to content

Commit 0b09431

Browse files
docs: update
1 parent 946a5a1 commit 0b09431

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,15 @@ This may change in the future when the module system (i. e. webpack) supports lo
335335
### `modules`
336336

337337
Type: `Boolean|String|Object`
338-
Default: based on filename, `true` for all files matching `/\.module\.\w+$/i.test(filename)` regular expression, more information you can read [here](https://github.com/webpack-contrib/css-loader#auto)
338+
Default: `undefined`
339+
340+
Enables/Disables CSS Modules and their configuration:
339341

340-
Enables/Disables CSS Modules and their configuration.
342+
- `undefined` - processed all files matching `/\.module\.\w+$/i.test(filename)` and `/\.icss\.\w+$/i.test(filename)` regular expression
343+
- `true` - processed all files
344+
- `false` - disables CSS Modules
345+
- `string` - processed all files, more information you can read [here](https://github.com/webpack-contrib/css-loader#mode)
346+
- `object` - processed all files, when `modules.auto` option is not specified, more information you can read [here](https://github.com/webpack-contrib/css-loader#auto)
341347

342348
The `modules` option enables/disables the **[CSS Modules](https://github.com/css-modules/css-modules)** specification and setup basic behaviour.
343349

@@ -598,9 +604,17 @@ module.exports = {
598604
##### `auto`
599605

600606
Type: `Boolean|RegExp|Function`
601-
Default: `'true'`
607+
Default: `undefined`
608+
609+
Allows auto enable CSS modules based on filename when `modules` option is object.
610+
611+
Possible values:
602612

603-
Allows auto enable CSS modules based on filename.
613+
- `undefined` - processed all files
614+
- `true` - processed all files matching `/\.module\.\w+$/i.test(filename)` and `/\.icss\.\w+$/i.test(filename)` regular expression
615+
- `false` - disables CSS Modules
616+
- `RegExp` - processed all files matching `/RegExp/i.test(filename)` regular expression
617+
- `Function` - enable CSS Modules for files based on the filename satisfying your filter function check.
604618

605619
###### `Boolean`
606620

0 commit comments

Comments
 (0)