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
+24-8Lines changed: 24 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,14 +170,30 @@ NODE_ENV=production ./test
170
170
171
171
## Configuration
172
172
173
-
|Name|Description|Default|
174
-
|---|---|---|
175
-
|`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()`|
176
-
|`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 and extra plugins for them. ||
178
-
|`generateScopedName`|Refer to [Generating scoped names](https://github.com/css-modules/postcss-modules#generating-scoped-names)|`[path]___[name]__[local]___[hash:base64:5]`|
179
-
|`removeImport`|Remove the matching style import. This option is used to enable server-side rendering.|`false`|
180
-
|`webpackHotModuleReloading`|Enables hot reloading of CSS in webpack|`false`|
173
+
```js
174
+
type FiletypeOptionsType = {|
175
+
+syntax: string,
176
+
+plugins?: $ReadOnlyArray<string>
177
+
|};
178
+
179
+
type FiletypesConfigurationType = {
180
+
[key: string]: FiletypeOptionsType
181
+
};
182
+
183
+
type GenerateScopedNameType= (localName:string, resourcePath:string) => string;
184
+
185
+
type GenerateScopedNameConfigurationType = GenerateScopedNameType | string;
186
+
187
+
```
188
+
189
+
|Name|Type|Description|Default|
190
+
|---|---|---|---|
191
+
|`context`|`string`|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()`|
192
+
|`exclude`|`string`|A RegExp that will exclude otherwise included files e.g., to exclude all styles from node_modules `exclude: 'node_modules'`|
193
+
|`filetypes`|`?FiletypesConfigurationType`|Configure [postcss syntax loaders](https://github.com/postcss/postcss#syntaxes) like sugerss, LESS and SCSS and extra plugins for them. ||
194
+
|`generateScopedName`|`?GenerateScopedNameConfigurationType`|Refer to [Generating scoped names](https://github.com/css-modules/postcss-modules#generating-scoped-names)|`[path]___[name]__[local]___[hash:base64:5]`|
195
+
|`removeImport`|`boolean`|Remove the matching style import. This option is used to enable server-side rendering.|`false`|
196
+
|`webpackHotModuleReloading`|`boolean`|Enables hot reloading of CSS in webpack|`false`|
181
197
182
198
Missing a configuration? [Raise an issue](https://github.com/gajus/babel-plugin-react-css-modules/issues/new?title=New%20configuration:).
0 commit comments