babel-plugin-react-css-modules icon indicating copy to clipboard operation
babel-plugin-react-css-modules copied to clipboard

generateScopedName as a function

Open davidhellsing opened this issue 5 years ago • 1 comments

I’m trying to use generateScopedName as a function which should be possible, but it resolves as undefined. F.ex;

generateScopedName: (localName, resourcePath) => { return 'foo' }

And then if I do console.log(typeof options.generateScopedName) in requireCssModule it becomes undefined. Strings works fine as the tests shows, but not functions.

davidhellsing avatar Jun 29 '19 13:06 davidhellsing

+1, it should be supported as you can do it with the css-loader's modules property

GitProdEnv avatar Jan 29 '22 08:01 GitProdEnv