Skip to main content

Updating to New Releases

In Create React App, there are two important packages:

  1. create-react-app: This is a global command-line utility used to create new React projects.
  2. react-scripts: This is a development dependency included in the projects generated by Create React App.

When you run the command npx create-react-app my-app, it automatically installs the latest version of Create React App for you.

Warn

If you have previously installed create-react-app globally using npm install -g create-react-app, please refer to the Getting Started guide to learn about the current installation steps.

Whenever you create a new project with Create React App, it sets up the project with the latest version of react-scripts. This ensures that you benefit from all the new features and improvements available in the latest version.

Updating react-scripts in an Existing Project

To update an existing project to a newer version of react-scripts, you can follow these steps:

  1. Open the changelog for Create React App.
  2. Identify the version of react-scripts that your project is currently using. You can find this information in the package.json file located in your project folder.
  3. Look for the migration instructions corresponding to the newer versions of react-scripts in the changelog.

In most cases, simply updating the react-scripts version in the package.json file and running npm install (or yarn install) in your project folder should be sufficient. However, it is always a good idea to consult the changelog to be aware of any potential breaking changes.

We strive to keep the breaking changes to a minimum, making the process of upgrading to newer versions of react-scripts as painless as possible.

Note:

Create React App does not automatically include polyfills for you. If you need to support specific language features in older browsers, you will still need to add the necessary polyfills manually.

info

If you make changes to the browserslist configuration but notice that your changes are not being picked up immediately, it may be due to an issue in babel-loader that prevents the detection of changes in your package.json. To resolve this, you can delete the node_modules/.cache folder and try again.