This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
git clone https://github.com/Liu-code3/vite-react-template.git
cd vite-template (进入项目)
pnpm install (安装依赖包)
pnpm run dev (启动服务)
- node: @16.20.2
- vite: @5.2.0
- react: @18.2.0
- react-dom: @18.20.2
- react-redux: @9.1.1
- @reduxjs/toolkit: @2.2.3
- react-router-dom: @6.22.3
- axios: @1.6.8
- antd: @5.16.2
- unocss: @0.59.3
- vite Next Generation Frontend Tooling
- react The library for web and native user interfaces
- react-dom 包提供了用户 DOM 的特定方法,可以在你应用程序的顶层进行使用,如果你有需要的话,还可以作为应急方案,在 React 模型以外的地方使用。
- react-redux Official React bindings for Redux
- @reduxjs/toolkit The official, opinionated, batteries-included toolset for efficient Redux development
- react-router-dom VS react-router
- axios Axios 使用简单,包尺寸小且提供了易于扩展的接口。
- antd
- unocss Instant On-demand Atomic CSS Engine