create-react-app - 如何升级 create-react-app 添加的依赖项
问题描述
我们何时以及如何升级create-react-app
添加到的依赖项package.json
?
今天我跑了npx create-react-app my-app --template typescript
,它添加了这些依赖项:
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3",
"typescript": "~3.7.2"
}
即使有些有更新的版本可用:
- “@testing-library/jest-dom”:“^5.11.4”
- “@testing-library/react”:“^11.0.4”
- "@testing-library/user-event": "^12.1.6"
- “打字稿”:“~4.0.3”
我们可以随时升级任何依赖项还是与特定版本相关联react-scripts
?如果是后者,我们如何知道何时升级以及升级到什么版本?
解决方案
推荐阅读
- openid-connect - ASP.Net Core OIDC 如何识别新登录
- python-3.x - 在 Python 中将特定的中文标点符号替换为对应的英文标点符号
- ruby - 在视图中使用“助手”方法
- docker - Redis 哨兵故障转移
- vue.js - 我应该如何将 VeeValidate 3 用于手机上的浏览器?
- javascript - 如何正确处理移动设备的链接标签?
- python - sendVideo 给出错误“错误请求:无法获取 HTTP URL 内容”
- node.js - Bcrypt 没有将散列密码分配给 body.password 变量
- java - 数据验证失败时请求映射方法不运行(Spring MVC)
- python - 将序列化程序错误写入记录器。Django 休息