Skip to content

Commit 7525e8f

Browse files
committed
fix: set default value for generateScopedName
this value is same as [css-loader](https://github.com/webpack/css-loader/blob/master/lib/processCss.js#L138) fix gajus#4 fix gajus#28
1 parent 369e362 commit 7525e8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/requireCssModule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ type OptionsType = {|
5050
export default (cssSourceFilePath: string, options: OptionsType): StyleModuleMapType => {
5151
// eslint-disable-next-line prefer-const
5252
let runner;
53-
54-
const scopedName = genericNames(options.generateScopedName);
53+
const localIdentName = options.generateScopedName || '[hash:base64]';
54+
const scopedName = genericNames(localIdentName);
5555

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

0 commit comments

Comments
 (0)