How to use css modules with create-react-app?

后端 未结 8 1807
孤独总比滥情好
孤独总比滥情好 2020-12-08 02:38

According to a tweet by Dan Abramov, CSS modules support is there in create-react-app (CRA). One just needs to give extension of module.css to his stylesheets t

8条回答
  •  情深已故
    2020-12-08 03:15

    You are using version 1.1.4 , so CSS Modules doesn't work by default ... above version 2.0, it works default by changing the css file name to name.module.css.

提交回复
热议问题