Create React App 5.0.0 发布,零配置创建 App

栏目: 软件资讯 · 发布时间: 3年前

内容简介:Create React App 5.0.0 现已发布,这是一个主要版本。Create React App 是由 Facebook 推出的脚手架,基本可以零配置搭建基于 webpack 的 React 开发环境,并内置了热更新等功能。 具体更新内容如下: Highligh...

Create React App 5.0.0 现已发布,这是一个主要版本。Create React App 是由 Facebook 推出的脚手架,基本可以零配置搭建基于 webpack 的 React 开发环境,并内置了热更新等功能。

具体更新内容如下:

Highlights

  • webpack 5 (#11201)
  • Jest 27 (#11338)
  • ESLint 8 (#11375)
  • PostCSS 8 (#11121)
  • Fast Refresh 改进和 bug 修复 (#11105)
  • 支持 Tailwind (#11717)
  • 改进的包管理器检测 (#11322)
  • 解除了所有的依赖关系,以便与其他 工具 更好地兼容 (#11474)
  • Dropped support for Node 10 and 12
  • 不再支持 Node 10 和 12

从 4.0.x 迁移到 5.0.0

在任何尚未 ejected 的已创建项目中,运行:

npm install --save --save-exact react-scripts@5.0.0

或者

yarn add --exact react-scripts@5.0.0

NOTE:如果在升级后遇到错误,你可能需要删除 node_modules 文件夹并通过运行 npm install(或 yarn)重新安装你的依赖。

Breaking Change

  • reate-react-app
    • #11322 使用 env var 检测 yarn 或 npm 作为包管理器
  • babel-preset-react-appcra-template-typescriptcra-templatecreate-react-appeslint-config-react-appreact-app-polyfillreact-dev-utilsreact-error-overlay,react-scripts
  • eslint-config-react-appreact-error-overlay,react-scripts
    • #10761 chore:迁移到 @babel/eslint-parser
  • react-scripts
    • #11188 弃用 root level template.json keys

错误修复

  • react-scripts
    • #11413 fix(webpackDevServer):禁用警告覆盖
    • #10511 修复样式表中的 ICSS 语法

完整内容可查看:https://github.com/facebook/create-react-app/releases/tag/v5.0.0


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Concepts, Techniques, and Models of Computer Programming

Concepts, Techniques, and Models of Computer Programming

Peter Van Roy、Seif Haridi / The MIT Press / 2004-2-20 / USD 78.00

This innovative text presents computer programming as a unified discipline in a way that is both practical and scientifically sound. The book focuses on techniques of lasting value and explains them p......一起来看看 《Concepts, Techniques, and Models of Computer Programming》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换