Issue
I am trying to use babel-plugin-react-css-modules in my React project for better performance as opposed to React CSS Modules.
However, the styles are being not applied correctly.
Cause
The version in <style>
tag is wrapped with weird hypen, for example:
- In the
<style>
tag:-components-Foo-___Foo__foo___1fcIZ-
- On the DOM
element class name:
components-Foo-___Foo__foo___1fcIZ
Even if we are using the same
localIdentName
, the generated results are different from selectors in css and className on DOM element.(Note: In babel-plugin-react-css-modules, the
localIdentName
is[path]___[name]__[local]___[hash:base64:5]
as hard-coded inoptions.generateScopedName
)
Any idea why there is a hypen-wrapper?