From 7525e8fc1009aa9efdf8220e945b62ee8e6024b0 Mon Sep 17 00:00:00 2001 From: taichi Date: Sat, 31 Dec 2016 01:39:05 +0900 Subject: [PATCH] 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 #4 fix #28 --- src/requireCssModule.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requireCssModule.js b/src/requireCssModule.js index f7cfd86..f1e2565 100644 --- a/src/requireCssModule.js +++ b/src/requireCssModule.js @@ -50,8 +50,8 @@ type OptionsType = {| export default (cssSourceFilePath: string, options: OptionsType): StyleModuleMapType => { // eslint-disable-next-line prefer-const let runner; - - const scopedName = genericNames(options.generateScopedName); + const localIdentName = options.generateScopedName || '[hash:base64]'; + const scopedName = genericNames(localIdentName); const fetch = (to: string, from: string) => { const fromDirectoryPath = dirname(from);