Skip to content

Commit 8d19fc0

Browse files
committed
fix: force default generateScopedName default
`generic-names` does not have default template value.
1 parent 0d7524d commit 8d19fc0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ NODE_ENV=production ./test
167167

168168
|Name|Description|Default|
169169
|---|---|---|
170-
|`generateScopedName`|Refer to [Generating scoped names](https://github.com/css-modules/postcss-modules#generating-scoped-names)|N/A (delegates default resolution to [postcss-modules](https://github.com/css-modules/postcss-modules))|
170+
|`generateScopedName`|Refer to [Generating scoped names](https://github.com/css-modules/postcss-modules#generating-scoped-names)|`[path]___[name]__[local]___[hash:base64:5]`|
171171

172172
Missing a configuration? [Raise an issue](https://github.com/gajus/babel-plugin-react-css-modules/issues/new?title=New%20configuration:).
173173

src/requireCssModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default (cssSourceFilePath: string, options: OptionsType): StyleModuleMap
5151
// eslint-disable-next-line prefer-const
5252
let runner;
5353

54-
const scopedName = genericNames(options.generateScopedName);
54+
const scopedName = genericNames(options.generateScopedName || '[path]___[name]__[local]___[hash:base64:5]');
5555

5656
const fetch = (to: string, from: string) => {
5757
const fromDirectoryPath = dirname(from);

0 commit comments

Comments
 (0)