You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### How to migrate from react-css-modules to babel-plugin-react-css-modules?
451
+
452
+
Follow the following steps:
453
+
454
+
* Remove `react-css-modules`.
455
+
* Add `babel-plugin-react-css-modules`.
456
+
* Configure `.babelrc` (see [Configuration](#configuration)).
457
+
* Remove all uses of the `cssModules` decorator and/or HoC.
458
+
459
+
If you are still having problems, refer to one of the user submitted guides:
460
+
461
+
*[Porting from react-css-modules to babel-plugin-react-css-modules (with Less)](http://www.jjinux.com/2018/04/javascript-porting-from-react-css.html)
462
+
449
463
### How to reference multiple CSS modules?
450
464
451
465
`react-css-modules` had an option [`allowMultiple`](https://github.com/gajus/react-css-modules#allowmultiple). `allowMultiple` allows multiple CSS module names in a `styleName` declaration, e.g.
This behaviour is enabled by default in `babel-plugin-react-css-modules`.
458
472
459
-
## How to live reload the CSS?
473
+
###How to live reload the CSS?
460
474
461
475
`babel-plugin-react-css-modules` utilises webpack [Hot Module Replacement](https://webpack.github.io/docs/hot-module-replacement.html) (HMR) to live reload the CSS.
0 commit comments