# React + TypeScript + Vite
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](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level `parserOptions` property like this:
```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
没有合适的资源?快使用搜索试试~ 我知道了~
基于react的移动端电商平台
共40个文件
tsx:10个
ts:10个
scss:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 51 浏览量
2023-11-20
13:06:13
上传
评论
收藏 370KB ZIP 举报
温馨提示
React + TypeScript + Vite 此模板提供了最低限度的设置,以便让 React 在 Vite 中使用 HMR 和一些 ESLint 规则工作。目前,有两个官方插件可用: @vitejs/plugin-react 使用 Babel 实现快速刷新 @vitejs/plugin-react-swc 使用 SWC 实现快速刷新 像这样配置顶层的 parserOptions 属性: 导出默认值 { // 其他规则... parserOptions: { ecmaVersion: 'latest'、 sourceType: module'、 项目 ['./tsconfig.json','./tsconfig.node.json']、 tsconfigRootDir: __dirname、 }, } 将 plugin:@typescript-eslint/recommended 替换为 plugin:@typescript-eslint/recommended-type-checked,安装 eslint-plugin-react
资源推荐
资源详情
资源评论
收起资源包目录
react-mobile-ts-master.zip (40个子文件)
react-mobile-ts-master
tsconfig.node.json 213B
.env.production 43B
src
assets
nxz.jpg 54KB
zwz.png 262KB
react.svg 4KB
main.tsx 236B
App.tsx 187B
api
home.ts 434B
goodsDetail.ts 214B
category.ts 189B
utils
request.ts 534B
App.css 0B
types
home.d.ts 506B
data.d.ts 74B
goodsDetail.d.ts 329B
cateGory.d.ts 136B
router
index.tsx 927B
vite-env.d.ts 38B
index.css 127B
views
Cart
index.tsx 97B
GoodsDetail
index.tsx 3KB
index.module.scss 923B
CateGory
index.tsx 3KB
index.module.scss 1KB
Layout
index.tsx 1KB
inde.module.scss 406B
Login
index.tsx 72B
Home
index.tsx 4KB
index.module.scss 1KB
My
index.tsx 84B
.env.development 43B
package.json 921B
public
vite.svg 1KB
package-lock.json 125KB
.eslintrc.cjs 436B
vite.config.ts 293B
index.html 366B
.gitignore 253B
tsconfig.json 670B
README.md 1KB
共 40 条
- 1
资源评论
十小大
- 粉丝: 9959
- 资源: 2555
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Python 手写实现 iD3 决策树算法-根据信息增益公式.zip
- 411675952289057车联助手-小窗版(三星)3.5.1.apk
- 三种快速排序方法合并在一个文件中以便直接运行的Python代码示例
- 937712277954201实习5.word
- 2程序语言基础知识pdf1_1716337722703.jpeg
- 简单的Python示例,演示了如何使用TCP/IP协议进行基本的客户端和服务器通信
- 考试.sql
- keil2 + proteus + 8051.exe
- 1961ee27df03bd4595d28e24b00dde4e_744c805f7e4fb4d40fa3f695bfbab035_8(1).c
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功