Open Igor-Vuk opened 6 years ago
I added a new entry in .babelrc for the test environment:
"development": {},
"production": {},
"test": {
"plugins": [
["babel-plugin-react-css-modules", {
"generateScopedName": "[name]-[local]", ⬅️ name it whatever you wish
...
}
}]
]
}
Is there a way to use it with babel-plugin-react-css-modules? There is no need for style object with this install. For example I use it like this.
styleName are CSS Modules and className are global (Bootstrap styles) and this is how my snapshot looks when testing with JEST. Instead of just the the name of the class it gives me the whole generated css module name.