creat-react-app 开启模块化scss 于先森 2021-04-15 130 阅读1分钟 添加配置 在node_modules/react-scripts/config/webpack.config.dev.js配置文件中 处理sass文件的rules处 加上modules:true此配置即可. 使用方法 import styles from './index.scss' ... <div class={styles.xxx}></div> ...