- workspace + pnpm init
- tsconfig
- eslintrc
- 限制提交规范
- husky
- npx husky install
- npx husky add .husky/pre-commit "pnpm run lint:fix && git add ."
- commitlint @commitlint/cli + @commitlint/config-conventional
- npx husky add .husky/commit-msg 'npx --no-install commitlint -e $HUSKY_GIT_PARAMS'
- husky
- 开发环境标识__DEV__: @rollup/plugin-replace
- 别名: @rollup/plugin-alias
- --force 代表不会走预编译,不走缓存
- jest
- jest-react
- jest-config: 默认配置
- jest-environment-jsdom: 跑测试用例的默认宿主环境
- babel
- @babel/core
- @babel/preset-env
- @babel/plugin-transform-react-jsx
- // 如果是React项目可以使用该集合 @babel/preset-react
- pnpm link --global + pnpm link [package] --global 指定为全局依赖包,必须在对应目录下进行
- 利用 vite 进行调试,需要处理引入路径的区别,不需要每次都重新打包