Packages

create-react-app

5.1.0 · 15 Feb 2025MIT34.4k / weekRepositoryHomepagenpmAtom feed

Your version

5.0.0

major14 Dec 2021Where it was published

5.1.0 is the newest release of 5.x.

In short

4 breaking1 removed1 security1 deprecated16 new4 fixed18 changed6 internal

  • Breaking

    Like any major release, react-scripts@5.0.0 contains a number of breaking changes.

  • Breaking

    create-react-app: Use env var to detect yarn or npm as the package manager (@lukekarrys)

  • Breaking

    babel-preset-react-app, cra-template-typescript, cra-template, create-react-app, eslint-config-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Webpack 5 (@raix)

  • Breaking

    eslint-config-react-app, react-error-overlay, react-scripts: chore: migrate to @babel/eslint-parser (@JLHwung)

  • Removed

    Dropped support for Node 10 and 12

  • Security

    react-dev-utils: Bump immer version for fixing security issue (@shamprasadrh)

  • Deprecated

    react-scripts: Deprecate root level template.json keys (@mrmckeb)

Release note

Create React App 5.0 is a major release with several new features and the latest version of all major dependencies.

Thanks to all the maintainers and contributors who worked so hard on this release! 🙌

Highlights

  • Webpack 5

  • Jest 27

  • ESLint 8

  • PostCSS 8

  • Fast Refresh improvements and bug fixes

  • Support for Tailwind

  • Improved package manager detection

  • Unpinned all dependencies for better compatibility with other tools

  • Removed

    Dropped support for Node 10 and 12

Migrating from 4.0.x to 5.0.0

Inside any created project that has not been ejected, run:

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

or

yarn add --exact react-scripts@5.0.0

NOTE: You may need to delete your node_modules folder and reinstall your dependencies by running npm install (or yarn) if you encounter errors after upgrading.

If you previously ejected but now want to upgrade, one common solution is to find the commits where you ejected (and any subsequent commits changing the configuration), revert them, upgrade, and later optionally eject again. It’s also possible that the feature you ejected for is now supported out of the box.

Breaking Changes

Like any major release, react-scripts@5.0.0 contains a number of breaking changes. We expect that they won't affect every user, but we recommend you look over this section to see if something is relevant to you. If we missed something, please file a new issue.

Dropped support for Node 10 and 12

Node 10 reached End-of-Life in April 2021 and Node 12 will be End-of-Life in April 2022. Going forward we will only support the latest LTS release of Node.js.

Full Changelog

:boom: Breaking Change

  • Breaking

    create-react-app: Use env var to detect yarn or npm as the package manager (@lukekarrys)

  • Breaking

    babel-preset-react-app, cra-template-typescript, cra-template, create-react-app, eslint-config-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Webpack 5 (@raix)

  • Breaking

    eslint-config-react-app, react-error-overlay, react-scripts: chore: migrate to @babel/eslint-parser (@JLHwung)

  • Deprecated

    react-scripts: Deprecate root level template.json keys (@mrmckeb)

:bug: Bug Fix

  • react-scripts: fix(webpackDevServer): disable overlay for warnings (@jawadsh123)

  • react-scripts: Fix ICSS syntax in stylesheets (@thabemmz)

:nail_care: Enhancement

  • react-scripts: Add support for Tailwind (@iansu)

  • react-scripts: Add source-map-loader for debugging into original source of node_modules libraries that contain sourcemaps (@justingrant)

  • react-scripts: Remove ESLint verification when opting-out (@mrmckeb)

  • eslint-config-react-app, react-error-overlay, react-scripts: feat(eslint-config-react-app): support ESLint 8.x (@MichaelDeBoey)

  • create-react-app: Use env var to detect yarn or npm as the package manager (@lukekarrys)

  • create-react-app: Coerce Node versions with metadata (@mrmckeb)

  • react-dev-utils: fix: fast refresh stops on needed bail outs (@pmmmwh)

  • react-dev-utils: Update ModuleNotFoundPlugin to support Webpack 5 (@raix)

  • create-react-app, react-scripts: Run npm with --no-audit (@gaearon)

:memo: Documentation

  • Other

    • The default port used by serve has changed (@leo)

    • Fix link address (@e-w-h)

    • Update PWA docs to point at the cra-template-pwa package (@slieschke)

    • Update IMAGE_INLINE_SIZE_LIMIT docs (@ianschmitz)

  • react-dev-utils: Suggest sass instead of node-sass package (@andrewywong)

  • babel-preset-react-app, eslint-config-react-app: Upgrade docs http links to https (@xom9ikk)

  • cra-template: Trivial English fixes (@ujihisa)

:house: Internal

  • Other

    • chore(test): make all tests install with npm ci (@lukekarrys)

    • [WIP] Fix integration test teardown / cleanup and missing yarn installation (@raix)

    • Remove package-lock.json (@Methuselah96)

  • create-react-app: Remove cached lockfile (@lukekarrys)

  • babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, create-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Update all dependencies (@jd1048576)

  • react-scripts: Update package.json (@HADMARINE)

  • react-scripts: fix: dependency issue after workbox-webpack-plugin 6.2 release (@fguitton)

  • Deprecated

    react-scripts: Deprecate root level template.json keys (@mrmckeb)

  • react-scripts: Remove outdated comments on react-refresh (@luk3kang)

  • babel-plugin-named-asset-import, confusing-browser-globals, create-react-app, eslint-config-react-app, react-dev-utils, react-error-overlay, react-scripts: Remove dependency pinning (@mrmckeb)

  • confusing-browser-globals, cra-template-typescript, cra-template, create-react-app: Bump template dependency version (@shfshanyue)

  • react-error-overlay, react-scripts: Use npm v7 with workspaces for local development and testing (@lukekarrys)

  • babel-preset-react-app, cra-template-typescript, cra-template, create-react-app, eslint-config-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Webpack 5 (@raix)

:hammer: Underlying Tools

  • react-dev-utils, react-scripts: Bump browserslist from 4.14.2 to 4.16.5 (@dependabot[bot])

  • react-scripts: allow CORS on webpack-dev-server (@hasanayan)

  • react-scripts: Update PostCSS version (@mrmckeb)

  • react-scripts: Update WebpackManifestPlugin (@raix)

  • react-scripts: Update PostCSS packages (@raix)

  • babel-plugin-named-asset-import, confusing-browser-globals, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Upgrade jest and related packages from 26.6.0 to 27.1.0 (@krreet)

  • eslint-config-react-app, react-error-overlay, react-scripts: chore: migrate to @babel/eslint-parser (@JLHwung)

  • babel-preset-react-app, react-dev-utils, react-error-overlay, react-scripts: Unpin babel dependencies (@mohd-akram)

  • Security

    react-dev-utils: Bump immer version for fixing security issue (@shamprasadrh)

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.