Skip to content

Commit d93adf4

Browse files
committed
BREAKING CHANGE: Filetype is now an object with properties 'syntax' and 'plugins'
1 parent a77f1a4 commit d93adf4

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ NODE_ENV=production ./test
174174
|---|---|---|
175175
|`context`|Must match webpack [`context`](https://webpack.github.io/docs/configuration.html#context) configuration. [`css-loader`](https://github.com/webpack/css-loader) inherits `context` values from webpack. Other CSS module implementations might use different context resolution logic.|`process.cwd()`|
176176
|`exclude`| a RegExp that will exclude otherwise included files e.g., to exclude all styles from node_modules `exclude: 'node_modules'`|
177-
|`filetypes`|Configure [postcss syntax loaders](https://github.com/postcss/postcss#syntaxes) like sugerss, LESS and SCSS. ||
177+
|`filetypes`|Configure [postcss syntax loaders](https://github.com/postcss/postcss#syntaxes) like sugerss, LESS and SCSS and extra plugins for them. ||
178178
|`generateScopedName`|Refer to [Generating scoped names](https://github.com/css-modules/postcss-modules#generating-scoped-names)|`[path]___[name]__[local]___[hash:base64:5]`|
179179
|`removeImport`|Remove the matching style import. This option is used to enable server-side rendering.|`false`|
180180
|`webpackHotModuleReloading`|Enables hot reloading of CSS in webpack|`false`|
@@ -198,7 +198,20 @@ To add support for different CSS syntaxes (e.g. SCSS), perform the following two
198198

199199
```json
200200
"filetypes": {
201-
".scss": "postcss-scss"
201+
".scss": {
202+
"syntax": "postcss-scss"
203+
}
204+
}
205+
```
206+
207+
And optionaly specify extra plugins
208+
209+
```json
210+
"filetypes": {
211+
".scss": {
212+
"syntax": "postcss-scss",
213+
"plugins": ["postcss-nested"]
214+
}
202215
}
203216
```
204217

0 commit comments

Comments
 (0)