Skip to content

Commit a4b8282

Browse files
committed
Add cssModules option to readme
1 parent 05c1618 commit a4b8282

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,12 @@ You should also add a `browserslist` property to your `package.json`, which defi
9999

100100
While Parcel CSS handles the most commonly used PostCSS plugins like `autoprefixer`, `postcss-preset-env`, and CSS modules, you may still need PostCSS for more custom plugins like TailwindCSS. If that's the case, just add @parcel/transformer-postcss before @parcel/transformer-css-experimental, and your PostCSS config will be picked up automatically. You can remove the plugins listed above from your PostCSS config, and they'll be handled by Parcel CSS.
101101

102-
You can also configure Parcel CSS in the `package.json` in the root of your project. Currently, two options are supported: `drafts`, which can be used to enable CSS nesting, and `pseudoClasses`, which allows replacing some pseudo classes like `:focus-visible` with normal classes that can be applied via JavaScript (e.g. polyfills).
102+
You can also configure Parcel CSS in the `package.json` in the root of your project. Currently, three options are supported: `drafts`, which can be used to enable CSS nesting, `pseudoClasses`, which allows replacing some pseudo classes like `:focus-visible` with normal classes that can be applied via JavaScript (e.g. polyfills), and `cssModules`, which enables CSS modules globally rather than only for files ending in `.module.css`.
103103

104104
```json
105105
{
106106
"@parcel/transformer-css": {
107+
"cssModules": true,
107108
"drafts": {
108109
"nesting": true
109110
},

0 commit comments

Comments
 (0)