一款基于 react、webpack 的项目脚手架,定位于移动端
- router 使用 @reach/router
- store 使用 @rematch/core
- 同时兼容
局部样式(css modules)与全局样式 - 未考虑兼容IE9以下
- 命名方式为
[stylename].module.scss - 组件中引入方式为
import styles from './home.module.scss'
home.module.scss
.index {
font-size: 18px;
color: #ff00ff;
}import styles from './home.module.scss'
<div className={cls(styles['index'])}></div>
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report