create-react-app
5.1.0 · 15 Feb 2025MIT34.4k / weekRepositoryHomepagenpmAtom feed
58 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 5.x · latest line
5.1.0
15 Feb 20255.0.1
12 Apr 2022react-scripts: fix: webpack noise printed only if error or warning (@Andrew47)
create-react-app: Warn when not using the latest version of create-react-app but do not exit (@iansu)
react-dev-utils: Ensure posix compliant joins for urls in middleware (@psiservices-justin-sullard)
Create React App 5.0.1 is a maintenance release that improves compatibility with React 18. We've also updated our templates to use
createRootand relaxed our check for older versions of Create React App.Migrating from 5.0.0 to 5.0.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@5.0.1
or
yarn add --exact react-scripts@5.0.1
:bug: Bug Fix
react-scripts: fix: webpack noise printed only if error or warning (@Andrew47)
create-react-app: Warn when not using the latest version of create-react-app but do not exit (@iansu)
react-dev-utils: Ensure posix compliant joins for urls in middleware (@psiservices-justin-sullard)
:nail_care: Enhancement
cra-template-typescript, cra-template, react-scripts: Update templates to use React 18
createRoot(@kyletsang)cra-template-typescript, cra-template: chore: upgrade rtl version to support react 18 (@MatanBobi)
eslint-config-react-app: updated deprecated rules (@wisammechano)
5.0.0
14 Dec 2021- Removed
Dropped support for Node 10 and 12
- 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)
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_modulesfolder and reinstall your dependencies by runningnpm install(oryarn) 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.0contains 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
servehas 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)
- 4.x
4.0.3
22 Feb 2021- Security
react-dev-utils: update immer to 8.0.1 to address vulnerability (@wclem4)
react-scripts: Upgrade eslint-webpack-plugin to fix opt-out flag (@mrmckeb)
create-react-app: tests: update test case to match the description (@jamesgeorge007)
v4.0.3 is a maintenance release that includes minor bug fixes and dependency updates.
:bug: Bug Fix
react-scripts: Upgrade eslint-webpack-plugin to fix opt-out flag (@mrmckeb)
:house: Internal
- Security
react-dev-utils: update immer to 8.0.1 to address vulnerability (@wclem4)
create-react-app: tests: update test case to match the description (@jamesgeorge007)
Migrating from 4.0.2 to 4.0.3
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@4.0.3
or
yarn add --exact react-scripts@4.0.3
4.0.2
3 Feb 2021react-scripts: Add support for new BUILD_PATH advanced configuration variable (@ajhyndman)
react-scripts: Add opt-out for eslint-webpack-plugin (@mrmckeb)
react-scripts: fix(react-scripts): add missing peer dependency react and update react-refresh-webpack-plugin (@merceyz)
v4.0.2 is a maintenance release that includes minor bug fixes and documentation updates.
:rocket: New Feature
react-scripts: Add support for new BUILD_PATH advanced configuration variable (@ajhyndman)
:bug: Bug Fix
react-scripts: Add opt-out for eslint-webpack-plugin (@mrmckeb)
react-scripts: fix(react-scripts): add missing peer dependency react and update react-refresh-webpack-plugin (@merceyz)
react-scripts: Add TypeScript 4.x as peerDependency to react-scripts (@sheepsteak)
:nail_care: Enhancement
react-scripts: Move ESLint cache file into node_modules (@ehsankhfr)
react-scripts: Improve vendor chunk names in development (@jrr)
:memo: Documentation
Remove references to Node 8 (@ianschmitz)
:house: Internal
react-scripts: appTsConfig immutability handling by immer (@josezone)
create-react-app: Fix CI tests (@ianschmitz)
:hammer: Underlying Tools
react-scripts: Revert "Update postcss packages" (@ianschmitz)
react-scripts: Upgrade sass-loader (@ehsankhfr)
react-scripts: Update postcss packages (@raix)
react-scripts: Upgrade @svgr/webpack to fix build error (@jabranr)
react-dev-utils: remove chalk from formatWebpackMessages (@jasonwilliams)
cra-template-typescript: chore: bump typescript version (@trainto)
cra-template-typescript, cra-template: chore: bump web-vital dependency version (@sahilpurav)
4.0.1
23 Nov 2020react-scripts: Fix noFallthroughCasesInSwitch/jsx object is not extensible (@ryota-murakami)
react-scripts: Fix react-jsx error (@benneq)
react-scripts: fix:
React is not definedcompilation error after ejected (@n3tr)
v4.0.1 is a maintenance release that includes minor bug fixes and documentation updates.
:bug: Bug Fix
react-scripts: Fix noFallthroughCasesInSwitch/jsx object is not extensible (@ryota-murakami)
react-scripts: Fix react-jsx error (@benneq)
react-scripts: fix:
React is not definedcompilation error after ejected (@n3tr)react-scripts: fix: slow recompile time (@FezVrasta)
react-dev-utils: fix: page doesn't get refreshed when FAST_REFRESH=false (@n3tr)
:nail_care: Enhancement
react-scripts: Increase Workbox's maximumFileSizeToCacheInBytes (@jeffposnick)
:house: Internal
create-react-app, react-dev-utils, react-scripts: replace inquirer with prompts (@EvanBacon)
cra-template-typescript, cra-template, react-scripts: [ImgBot] Optimize images (@MichaelDeBoey)
Other
chore: Update .prettierrc (@MichaelDeBoey)
Migrating from 4.0.0 to 4.0.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@4.0.1
or
yarn add --exact react-scripts@4.0.1
4.0.0
23 Oct 2020- Breaking
eslint-config-react-app, react-error-overlay, react-scripts: feat(eslint-config-react-app): Add jest & testing-library rules (@MichaelDeBoey)
- Breaking
eslint-config-react-app, react-error-overlay, react-scripts: Support ESLint 7.x (@MichaelDeBoey)
- Breaking
cra-template-typescript, cra-template, eslint-config-react-app, react-error-overlay, react-scripts: Remove EXTEND_ESLINT and add Jest rules (@mrmckeb)
Create React App 4.0 is a major release with several new features, including support for Fast Refresh!
Thanks to all the maintainers and contributors who worked so hard on this release! :raised_hands:
Highlights
Fast Refresh #8582
React 17 support
New JSX transform #9645
TypeScript 4 support #9734
ESLint 7 #8978
New Jest and React Testing Library rules #8963
Jest 26 #8955
PWA/workbox improvements
Switch to the Workbox InjectManifest plugin #9205
Now its own template so it can be released independently
Web Vitals support #9116
Migrating from 3.4.x to 4.0.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@4.0.0
or
yarn add --exact react-scripts@4.0.0
NOTE: You may need to delete your
node_modulesfolder and reinstall your dependencies by runningyarn(ornpm install) 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@4.0.0contains 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.ESLint
We've upgraded to ESLint 7 and added many new rules including some for Jest and React Testing Library as well as the
import/no-anonymous-default-exportrule. We've also upgradedeslint-plugin-hooksto version 4.0.0 and removed theEXTEND_ESLINTflag as it is no longer required to customize the ESLint config.Jest
We've upgraded to Jest 26 and now set
resetMockstotrueby default in the Jest config.Service workers
We've switched to the Workbox InjectManifest plugin and moved the PWA templates into their own repository.
Removed
typescriptflag andNODE_PATHsupportWe've removed the deprecated
typescriptflag when creating a new app. Use--template typescriptinstead. We've also dropped deprecatedNODE_PATHflag as this has been replaced by setting the base path injsconfig.json.Fix dotenv file loading order
We've changed the loading order of env files to match the
dotenvspecification. See #9037 for more details.Dropped Node 8 support
Node 8 reached End-of-Life at the end of 2019 and is no longer supported.
Detailed Changelog
:rocket: New Feature
eslint-config-react-app, react-error-overlay, react-scripts: feat(eslint-config-react-app): Add jest & testing-library rules (@MichaelDeBoey)
react-scripts: Add AVIF image support (@Hongbo-Miao)
react-scripts: Allow testMatch for jest config (@Favna)
react-scripts: Add back in --stats output from webpack. (@samccone)
react-scripts: Support devDependencies in templates (@mrmckeb)
create-react-app: feat: exit on outdated create-react-app version (@mrmckeb)
cra-template-typescript, cra-template, react-scripts: Switch to the Workbox InjectManifest plugin (@jeffposnick)
react-dev-utils, react-scripts: Add experimental react-refresh support (@charrondev)
:boom: Breaking Change
- Breaking
eslint-config-react-app, react-error-overlay, react-scripts: feat(eslint-config-react-app): Add jest & testing-library rules (@MichaelDeBoey)
- Breaking
eslint-config-react-app, react-error-overlay, react-scripts: Support ESLint 7.x (@MichaelDeBoey)
- Breaking
cra-template-typescript, cra-template, eslint-config-react-app, react-error-overlay, react-scripts: Remove EXTEND_ESLINT and add Jest rules (@mrmckeb)
- Breaking
eslint-config-react-app: fix: remove deprecated rule (@ljosberinn)
- Breaking
create-react-app: feat: exit on outdated create-react-app version (@mrmckeb)
- Breaking
cra-template-typescript, cra-template, react-scripts: Switch to the Workbox InjectManifest plugin (@jeffposnick)
- Breaking
babel-plugin-named-asset-import, confusing-browser-globals, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Upgrade to Jest 26 (@ianschmitz)
- Breaking
create-react-app, react-scripts: feat: remove typescript flag and NODE_PATH support (@mrmckeb)
- Breaking
react-scripts: Fix dotenv file loading order (@Timer)
- Breaking
react-scripts: Set resetMocks to true by default in jest config (@alexkrolick)
- Breaking
babel-plugin-named-asset-import, babel-preset-react-app, create-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Dependency major version upgrades (@ianschmitz)
- Breaking
eslint-config-react-app, react-scripts: Add import/no-anonymous-default-export lint rule (@shakib609)
- Breaking
eslint-config-react-app, react-scripts: Bump React Hooks ESLint plugin to 4.0.0 (@gaearon)
- Breaking
cra-template-typescript, cra-template, create-react-app, react-app-polyfill, react-dev-utils, react-scripts: Drop Node 8 support (@ianschmitz)
- Breaking
babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, cra-template-typescript, react-dev-utils, react-error-overlay, react-scripts: Upgrade to Jest 25 (@skovhus)
:bug: Bug Fix
react-scripts: Fix refreshOverlayInterop module scope error (@ianschmitz)
react-scripts: Fix dotenv file loading order (@Timer)
react-scripts: Skip stdin resuming to support lerna parallel (@hieuxlu)
react-scripts: Do not check for interactive session to shut down dev server (@jeremywadsack)
react-scripts: Add .cjs and .mjs files support to test runner (@ai)
babel-preset-react-app, eslint-config-react-app, react-scripts: fix: resolve new JSX transform issues (@mrmckeb)
eslint-config-react-app, react-scripts: fix: resolve ESLint config from appPath (@mrmckeb)
create-react-app: Fix template name handling (@iansu)
babel-preset-react-app: fix: use default modules option from
preset-env(@JLHwung)react-dev-utils: Publish refreshOverlayInterop with react-dev-utils (@klinem)
react-dev-utils: Replace period in CSS Module classnames (@evankennedy)
react-dev-utils, react-scripts: Use process.execPath to spawn node subprocess (@anuraaga)
cra-template-typescript, cra-template, react-scripts: fix: handle templates without main package field (@mrmckeb)
:nail_care: Enhancement
react-scripts: Use new JSX setting with TypeScript 4.1.0 (@iansu)
react-scripts: Support source maps for scss in dev environments (@MKorostoff)
react-scripts: Don't use webpack multi entry unnecessarily (@sebmarkbage)
babel-preset-react-app, eslint-config-react-app, react-scripts: New JSX Transform opt out (@iansu)
cra-template: feat: remove unused React imports (@mrmckeb)
babel-preset-react-app, react-scripts: Use new JSX transform with React 17 (@iansu)
react-dev-utils, react-scripts: Add Fast Refresh warning when using React < 16.10 (@iansu)
react-dev-utils, react-error-overlay, react-scripts: feat: better refresh plugin integration (@pmmmwh)
cra-template-typescript, cra-template: Add performance relayer + documentation (web-vitals) (@housseindjirdeh)
cra-template-typescript, cra-template: Update template tests (@MichaelDeBoey)
create-react-app: Fix --use-pnp for Yarn 2 (@nickmccurdy)
:memo: Documentation
Other
Upgrade Docusaurus to latest version (@lex111)
Emphasise that Next.js is capable of SSG (@liamness)
Update running-tests.md (@MichaelDeBoey)
Update Vercel deployment documentation (@timothyis)
Update running-tests.md (@andycanderson)
[Doc] fix React Testing Library example (@sakito21)
Clarify wording in adding TypeScript to existing project (@merelinguist)
Fix chai URL (@BMorearty)
Update deployment docs for Azure Static Web Apps (@burkeholland)
Add a VSCode tip in the CSS reset section (@maazadeeb)
Update url to see prettier in action (@M165437)
Simplify wording in setting-up-your-editor.md (@coryhouse)
Add setupTests.js to the list of generated files (@MostafaNawara)
Use simplified import of @testing-library/jest-dom (@Dremora)
react-dev-utils: Fixes in the /packages/react-devs-utils/README.md file (@caspero-62)
react-dev-utils: Update build script deployment URL (@StenAL)
cra-template-typescript, cra-template: Updated README.md Templates to Follow ESLint Markdown Rules (@firehawk09)
cra-template-typescript, cra-template: Upgrade testing-library packages (@gnapse)
react-scripts: Explain how to uninstall create-react-app globally (@nickmccurdy)
react-scripts: Support devDependencies in templates (@mrmckeb)
cra-template-typescript, cra-template, react-dev-utils, react-scripts: Move shortlinks to cra.link (@iansu)
babel-preset-react-app: Include absoluteRuntime in babel preset docs (@iddan)
:house: Internal
eslint-config-react-app: fix(eslint-config-react-app): Make eslint-plugin-jest an optional peerDependency (@MichaelDeBoey)
Other
fix: Fix azure-pipelines' endOfLine (@MichaelDeBoey)
Replace Spectrum links with GitHub Discussions (@iansu)
Bump acorn from 6.4.0 to 6.4.1 in /docusaurus/website (@dependabot[bot])
Specify what files are served form a bare local copy (@challet)
cra-template-typescript, cra-template: feat: Update testing-library dependencies to latest (@MichaelDeBoey)
react-dev-utils: clean formatMessage usage (@chenxsan)
cra-template: Bump version of Verdaccio (@ianschmitz)
babel-preset-react-app: Remove outdated comment (@availchet)
react-scripts: fix react-refresh babel plugin not applied (@tanhauhau)
:hammer: Underlying Tools
react-scripts: Pass JSX runtime setting to Babel preset in Jest config (@iansu)
react-scripts: Bump resolve-url-loader version (@johannespfeiffer)
react-scripts: Upgrade refresh plugin (@ianschmitz)
react-scripts: Bump style-loader to 1.2.1 (@chybisov)
react-error-overlay, react-scripts: Upgrade to React 17 (@iansu)
react-error-overlay, react-scripts: feat: Update ESLint dependencies (@MichaelDeBoey)
babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, cra-template-typescript, cra-template, create-react-app, eslint-config-react-app, react-app-polyfill, react-error-overlay, react-scripts: feat: Update all dependencies (@MichaelDeBoey)
eslint-config-react-app, react-dev-utils, react-scripts: Replace deprecated eslint-loader by eslint-webpack-plugin (@tooppaaa)
babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, cra-template-typescript, cra-template, create-react-app, eslint-config-react-app, react-dev-utils, react-error-overlay, react-scripts: Upgrade dependencies (@ianschmitz)
eslint-config-react-app, react-error-overlay, react-scripts: feat: Update ESLint dependencies (@MichaelDeBoey)
eslint-config-react-app, react-error-overlay, react-scripts: feat: Update ESLint dependencies (@MichaelDeBoey)
eslint-config-react-app, react-error-overlay, react-scripts: Support ESLint 7.x (@MichaelDeBoey)
cra-template-typescript, cra-template: Update template dependencies to latest version (@MichaelDeBoey)
cra-template-typescript, cra-template: Upgrade testing-library packages (@gnapse)
react-app-polyfill: Upgrade whatwg-fetch (@Lapz)
react-dev-utils: Bump immer version (@staff0rd)
babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Upgrade dependencies (@ianschmitz)
babel-preset-react-app, cra-template-typescript, cra-template, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Upgrade dependencies (@ianschmitz)
babel-preset-react-app, cra-template-typescript, cra-template, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Upgrade dependencies (@ianschmitz)
babel-plugin-named-asset-import, confusing-browser-globals, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Upgrade to Jest 26 (@ianschmitz)
babel-preset-react-app, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Update packages (@ianschmitz)
babel-preset-react-app, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Minor/patch dependency upgrades (@ianschmitz)
babel-plugin-named-asset-import, babel-preset-react-app, create-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Dependency major version upgrades (@ianschmitz)
eslint-config-react-app, react-scripts: Bump React Hooks ESLint plugin to 4.0.0 (@gaearon)
babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, cra-template-typescript, react-dev-utils, react-error-overlay, react-scripts: Upgrade to Jest 25 (@skovhus)
- 3.x
3.4.1
21 Mar 2020react-scripts: Use native ESLint behaviour when extending (@mrmckeb)
react-scripts: Closes webpack dev server and exits process on "end" stdin (@kelseyleftwich)
babel-preset-react-app: Fix optional chaining and nullish coalescing support (@ianschmitz)
v3.4.1 is a maintenance release that includes minor bug fixes and documentation updates including upgrading Babel to fix a bug in the 7.8 release line. This release also brings support for TypeScript 3.8.
:bug: Bug Fix
react-scripts: Use native ESLint behaviour when extending (@mrmckeb)
react-scripts: Closes webpack dev server and exits process on "end" stdin (@kelseyleftwich)
babel-preset-react-app: Fix optional chaining and nullish coalescing support (@ianschmitz)
cra-template, eslint-config-react-app, react-scripts: Widen eslint-config-react-app peer dependency versions (@lukyth)
:nail_care: Enhancement
cra-template-typescript, cra-template: Add React.StrictMode to default templates (@connkat)
react-scripts: allow specification of package.main in template.json (@EvanBoyle)
:memo: Documentation
Other
react-scripts: Use native ESLint behaviour when extending (@mrmckeb)
:hammer: Underlying Tools
babel-preset-react-app, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Update to Babel 7.9 (@ianschmitz)
babel-preset-react-app, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Bump dependencies (@ianschmitz)
react-scripts: Bumps pnp-webpack-plugin (@arcanis)
Migrating from 3.4.0 to 3.4.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.4.1
or
yarn add --exact react-scripts@3.4.1
3.4.0
14 Feb 2020react-scripts: Downgrade style-loader to v0.23.1 due to CSS modules hot reload not working with v1.0.0 and above (@chybisov)
create-react-app, react-dev-utils, react-error-overlay: Downgrade chalk for ie 11 support (@ianschmitz)
react-dev-utils: Fixes unchecked access to 'deploy' script on build (@renato-bohler)
v3.4.0 is a minor release that adds new features, including support for SSL and setting
PUBLIC_URLin development. It also includes a fix for Hot Module Reloading with CSS Modules as well as other bug fixes.:bug: Bug Fix
react-scripts: Downgrade style-loader to v0.23.1 due to CSS modules hot reload not working with v1.0.0 and above (@chybisov)
create-react-app, react-dev-utils, react-error-overlay: Downgrade chalk for ie 11 support (@ianschmitz)
react-dev-utils: Fixes unchecked access to 'deploy' script on build (@renato-bohler)
cra-template-typescript, cra-template: Handle service worker error in Firefox (@rosinghal)
cra-template-typescript: Fix robots.txt for TS (@Kamahl19)
:nail_care: Enhancement
react-dev-utils, react-scripts: fix(react-scripts): do not redirect served path if request may proxy (@iamandrewluca)
react-dev-utils, react-scripts: feat(react-scripts): allow PUBLIC_URL in develoment mode (@iamandrewluca)
react-dev-utils, react-scripts: Enable custom sockjs pathname for hot reloading server. (@heygrady)
cra-template-typescript: Change arrow functions to function declarations (@lewislbr)
cra-template-typescript, cra-template: Handle service worker error in Firefox (@rosinghal)
react-scripts: Add option to provide custom ssl certificates during development (@alexbrazier)
:memo: Documentation
cra-template-typescript, cra-template, react-dev-utils, react-error-overlay, react-scripts: Correct webpack name casing (@lewislbr)
Other
Fix navbar line break in header (@esvyridov)
Update public folder usage docs to clarify globals (@keevan)
setupTestFrameworkScriptFile is deprecated (@JimmyLv)
:hammer: Underlying Tools
react-dev-utils: update open to v7.0.2 (@vince1995)
react-dev-utils: Support JetBrains Rider IDE as an editor (@djpowell)
react-dev-utils: Wider Chromium support for openBrowser (@handeyeco)
react-scripts: Run git init before template dependencies are installed (@lukaszfiszer)
Other
fix(test): force install npm in e2e-behaviour (@iamandrewluca)
Migrating from 3.3.1 to 3.4.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.4.0
or
yarn add --exact react-scripts@3.4.0
3.3.1
31 Jan 2020- Security
react-error-overlay, react-scripts: [Security] Update terser webpack plugin (@RDIL)
cra-template: Add "Disallow:" to robots.txt (@tomoyaf)
react-scripts: Fix sass importLoaders (@mariusc23)
v3.3.1 is a maintenance release that includes minor bug fixes and documentation updates.
:bug: Bug Fix
cra-template: Add "Disallow:" to robots.txt (@tomoyaf)
react-scripts: Fix sass importLoaders (@mariusc23)
react-scripts: Add titleProp to SVGR ReactComponent type definition (@rhnorskov)
react-scripts: fix(react-scripts): proactively append to .gitignore during generation (@bmuenzenmeyer)
react-scripts: Fix CSS font-face minification (@sidonaldson)
babel-preset-react-app: Sync dependencies babel config (@ianschmitz)
react-dev-utils: Add slashes to WebSocket protocol URL (@Baael)
react-dev-utils: webpackHotDevClient now uses wss when https is used (@mikecaulley)
:nail_care: Enhancement
react-error-overlay: Add helpful message to the footer (@pyrogenic)
cra-template-typescript: Remove React.FC from Typescript template (@Retsam)
cra-template-typescript, cra-template, react-scripts: Add template support for any package.json keys (#8082) (@tomvalorsa)
create-react-app: Support shorthand scoped templates (@kevin940726)
create-react-app: Add current version and bin location to --info output (@heyimalex)
cra-template-typescript, cra-template: Replace favicon in templates (@heyimalex)
eslint-config-react-app: Remove error for @typescript-eslint/no-namespace (@szhu)
:memo: Documentation
Other
docs: Add troubleshooting documentation on ENOSPC (@huchenme)
Update docs according to lint-staged v10 (@lukyth)
Remove outdated docs regarding vscode eslint extension and typescript autofix (@alex-vukovity-cko)
Update setting-up-your-editor.md (@dev-xu)
Update custom template docs with instructions for testing custom template locally (@kevinold)
Minor grammatical edit (@egrim)
Little typo (@sonyarianto)
update PWA docs links to point to template package (@peet)
Add package-runner note to readme (@JeromeDeLeon)
chore: update docusaurus & tweak site (@endiliey)
Fix typo in CHANGELOG.md (@Trontor)
Add custom-templates to docs sidebar (@ianschmitz)
:house: Internal
create-react-app: Minor refactors in create-react-app (@heyimalex)
:hammer: Underlying Tools
babel-preset-react-app, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Remove outdated babel plugins (@ianschmitz)
babel-preset-react-app, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Update Dependencies (@RDIL)
babel-preset-react-app, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Fix CI build (@ianschmitz)
react-dev-utils: Downgrade open from 7.0.0 to 6.4.0 (@vince1995)
react-dev-utils: Bump pkgUp (@andriijas)
babel-plugin-named-asset-import: Bump babel-plugin-tester and fix breaking changes (@andriijas)
create-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Bump internal dependencies (@andriijas)
create-react-app, react-dev-utils, react-error-overlay: Bump chalk (@andriijas)
- Security
react-error-overlay, react-scripts: [Security] Update terser webpack plugin (@RDIL)
Migrating from 3.3.0 to 3.3.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.3.1
or
yarn add --exact react-scripts@3.3.1
3.3.0
5 Dec 2019- Breaking
create-react-app,react-dev-utils,react-scripts babel-preset-react-app: Add optional chaining and nullish coalescing operators support (@renatoagds)
babel-preset-react-app, react-dev-utils: Add numeric separator support (@tharun208)
v3.3.0 is a minor release that adds new features, including custom templates and support for the new optional chaining and nullish coalescing operators.
Custom Templates
You can now create a new app using custom templates.
We've published our existing templates as
cra-templateandcra-template-typescript, but we expect to see many great templates from the community over the coming weeks.The below command shows how you can create a new app with
cra-template-typescript.npx create-react-app my-app --template typescript
Note that you can omit the prefix
cra-template-when specifying which template you would like. For TypeScript users, we're deprecating--typescriptin favour of--template typescript.If you don't set a template, we'll create your new app with
cra-template- which is just a new name for our base template.Optional Chaining and Nullish Coalescing Operators
We now support the optional chaining and nullish coalescing operators!
// Optional chaining a?.(); // undefined if `a` is null/undefined b?.c; // undefined if `b` is null/undefined // Nullish coalescing undefined ?? 'some other default'; // result: 'some other default' null ?? 'some other default'; // result: 'some other default' '' ?? 'some other default'; // result: '' 0 ?? 300; // result: 0 false ?? true; // result: false
If you're using TypeScript, you will need to upgrade your
typescriptdependency to3.7.0or later if you wish to use the new operators.If you're using Visual Studio Code 1.40 (the latest as of this release) or earlier, you will need to configure your editor if you want it to understand the new operators.
If you're using TypeScript in your project and have already upgrade its version as described above, then you can configure VS Code to
Use Workspace Versionof TypeScript. If your project isn't using TypeScript, you can use the JavaScript and TypeScript Nightly extension until VS Code releases a newer version including TypeScript3.7.0or newer.Numeric Separators
We've added support for numeric separators to improve readability of numeric literals.
1000000000; // Is this a billion? a hundred millions? Ten millions? 101475938.38; // what scale is this? what power of 10? 1_000_000_000; // Ah, so a billion 101_475_938.38; // And this is hundreds of millions
no-unexpected-multiline
We've removed this rule as it is not compatible with Prettier. If you rely on this rule you can re-enable it by extending our ESLint config and adding the following:
{ "extends": "react-app", "rules": { "no-unexpected-multiline": "warn" } }:rocket: New Feature
babel-preset-react-app: Add optional chaining and nullish coalescing operators support (@renatoagds)
babel-preset-react-app, react-dev-utils: Add numeric separator support (@tharun208)
cra-template-typescript, cra-template, create-react-app, react-scripts: Add template support (@mrmckeb)
:boom: Breaking Change
- Breaking
create-react-app,react-dev-utils,react-scriptsBump webpack-dev-server (@ianschmitz)
NOTE: This is only a breaking change if you're using
react-dev-utilsoutside of Create React App.
:bug: Bug Fix
eslint-config-react-app: Remove no-unexpected-multiline rule (@iansu)
create-react-app: Support templates in scoped packages (@klasbj)
create-react-app: added check for typescript template and unsupported node version (@awaseem)
react-scripts: Mark TypeScript as an optional peer dependency for react-scripts (@dstaley)
react-scripts: Fix absolute paths issue in Jest (@rovansteen)
react-scripts: Fixed process type in TypeScript template. (@fuszenecker)
react-dev-utils: Edit InterpolateHtmlPlugin hook (#6448) (@GuiHash)
:nail_care: Enhancement
cra-template-typescript, cra-template: Prefix apple-touch-icon links with PUBLIC_URL (@benblank)
cra-template-typescript, cra-template: Add @testing-library to the default templates (@kentcdodds)
react-scripts: Add scripts support to templates (@mrmckeb)
react-scripts: Add restoreMocks to supported jest config keys (@ianschmitz)
react-scripts: Add additional information for postcss errors (#6282) (@buildbreakdo)
react-scripts: Add Service-Worker header to checkValidServiceWorker (@darthmaim)
react-scripts: feat: add additional Jest keys to whitelist (@mrmckeb)
react-scripts: Fix node_modules sourcemap config (which will fix VSCode debugging of CRA apps) (@justingrant)
cra-template: No spinning React logo if
prefers-reduced-motion(@donavon)create-react-app, react-error-overlay: Dark scheme overlay (@Fabianopb)
babel-preset-react-app: Add babel runtime version to transform-runtime plugin to reduce bundle size (@topaxi)
:memo: Documentation
Other
Update template docs (@mrmckeb)
Add contributors section to readme (@ianschmitz)
chore: Fix broken link for e2e README (@haruelrovix)
Bump docusaurus 🦖 (@andriijas)
📖 DOC: Improvement (@waahab)
Update adding-bootstrap.md (@Xuhao)
chore: update README.md gif links (@cchanxzy)
Link to ASP.NET Core docs (@Daniel15)
Update getting-started.md (@reactjser)
Add a note about .eslintignore files being respected (@seanlaff)
Link to React documentation for code splitting (@Hugodby)
Upgrade to docusaurus 2 (@endiliey)
Fix grammar error in troubleshooting.md (@jakeboone02)
Document correct default behavior for HOST var (@jsejcksn)
Tightens up the TypeScript docs (@orta)
Clarify dynamic import stage in docs (@aprilandjan)
react-dev-utils, react-scripts: Add placeholders where old template READMEs used to be (@iansu)
react-dev-utils: chore: Fix broken link for CRA deployment (@haruelrovix)
react-scripts: Add Alex to lint documentation (@iansu)
react-scripts: Fix notations of loopback addresses (@wataash)
:house: Internal
react-scripts: Add TypeScript peer dependency to react-scripts (@iansu)
react-scripts: Add tests for optional chaining and null coalescing (@ianschmitz)
react-scripts: Revert logo in templates (@iansu)
Other
eslint-config-react-app: Use @typescript-eslint/no-unused-expressions to support optional chaining (@maxdavidson)
create-react-app: refactor: remove double coerce (@mrmckeb)
create-react-app: Pass through fully specified template name (@iansu)
cra-template-typescript: Make base and TypeScript templates consistent (@suprj)
create-react-app, react-dev-utils, react-scripts: Temporarily disable Windows in CI (@ianschmitz)
:hammer: Underlying Tools
babel-preset-react-app, cra-template-typescript, cra-template, create-react-app, react-dev-utils, react-error-overlay, react-scripts: Bump dependencies (@ianschmitz)
create-react-app, react-dev-utils, react-scripts: Bump webpack-dev-server (@ianschmitz)
create-react-app, react-dev-utils, react-scripts: Bump styling related loaders (@andriijas)
react-app-polyfill: Unpin dependencies in react-app-polyfill (@ianschmitz)
babel-preset-react-app, react-app-polyfill, react-dev-utils, react-scripts: Bump dependencies (@ianschmitz)
react-scripts: Upgrade jest-watch-typeahead (@Andarist)
react-scripts: Fix eslint complaints in build.js (@andriijas)
react-scripts: feat: upgrade terser & enable parallel minification in wsl (@endiliey)
react-scripts: Move unused eslint webpack import into @remove-on-eject block (@mrseanbaines)
babel-preset-react-app, cra-template-typescript, create-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Fix CI (@ianschmitz)
react-dev-utils: Update open (@andriijas)
babel-plugin-named-asset-import, babel-preset-react-app, react-error-overlay, react-scripts: Upgrade outdated packages (@andriijas)
react-error-overlay, react-scripts: Bump react (@andriijas)
Migrating from 3.2.0 to 3.3.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.3.0
or
yarn add --exact react-scripts@3.3.0
3.2.0
3 Oct 2019- Removed
react-dev-utils, react-scripts: Remove 'shortcut' link type before 'icon' (@lewislbr)
react-scripts: Support production profiling with React Developer Tools (@JacobMGEvans)
react-dev-utils, react-scripts: Adds TSC_COMPILE_ON_ERROR env var... (@kylebebak)
v3.2.0 is a minor release that adds support for production profiling and ignoring TypeScript type errors to make migrating JavaScript projects to TypeScript easier. It also includes other minor bug fixes and documentation updates.
:rocket: New Feature
react-scripts: Support production profiling with React Developer Tools (@JacobMGEvans)
react-dev-utils, react-scripts: Adds TSC_COMPILE_ON_ERROR env var... (@kylebebak)
:bug: Bug Fix
react-scripts: Fix linting error when using rest props (@alexandrtovmach)
react-app-polyfill: Guard polyfills against window possibly being undefined (@jxom)
:nail_care: Enhancement
react-scripts: Use installing package manager in README (@ashr81)
react-scripts: Support setting baseUrl to root directory (@rovansteen)
react-scripts: only load eslint config when EXTEND_ESLINT environment variable is specified/ do not swallow eslint config errors (@n1ru4l)
react-scripts: set output.globalObject to 'this' (@kentcdodds)
react-scripts: Add "entrypoints" key to asset manifest (@samuelmeuli)
react-scripts: enable .eslintignore again (@igtm)
react-dev-utils: Stop hiding the column number of ESLint errors (@justingrant)
:house: Internal
react-scripts: Fix wrong letter casing (@lewislbr)
- Removed
react-dev-utils, react-scripts: Remove 'shortcut' link type before 'icon' (@lewislbr)
:hammer: Underlying Tools
react-scripts: Remove switch case (@andrelmlins)
Migrating from 3.1.2 to 3.2.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.2.0
or
yarn add --exact react-scripts@3.2.0
3.1.2
19 Sep 2019react-scripts: Change runtime chunk name separator from tilde to dash (@javadoug)
react-scripts: Explicitly checking that EXTEND_ESLINT is true (@BrockWills)
babel-preset-react-app, react-error-overlay, react-scripts: Fix build (@ianschmitz)
v3.1.2 is a maintenance release that includes minor bug fixes and documentation updates.
:bug: Bug Fix
react-scripts: Change runtime chunk name separator from tilde to dash (@javadoug)
react-scripts: Explicitly checking that EXTEND_ESLINT is true (@BrockWills)
babel-preset-react-app, react-error-overlay, react-scripts: Fix build (@ianschmitz)
:nail_care: Enhancement
react-scripts: Add new logo (@iansu)
react-scripts: Minor performance improvements (@deftomat)
react-scripts: Disable babel-loader's cacheCompression (@jleclanche)
:memo: Documentation
cleanup-after-each is no longer necessary! (@iHmD)
:house: Internal
react-scripts: The variable dotenvFiles is never reassigned - use const instead (@Primajin)
react-scripts: remove trailing spaces (@xiaoxiangmoe)
:hammer: Underlying Tools
babel-plugin-named-asset-import, confusing-browser-globals, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Bump dependencies (@ianschmitz)
react-scripts: Upgrade dotenv-expand to fix issues (@DominicTobias)
eslint-config-react-app, react-scripts: Bump version of @typescript-eslint/* (@pierreneter)
Migrating from 3.1.1 to 3.1.2
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.1.2
or
yarn add --exact react-scripts@3.1.2
3.1.1
13 Aug 2019react-scripts: Fix ESLint 6 support (@ianschmitz)
react-scripts: Don't block static files in robots.txt (@iansu)
eslint-config-react-app: Ignore "jsx-a11y/aria-role" for React components (@deftomat)
v3.1.1 is a maintenance release that includes minor bug fixes and documentation updates.
:bug: Bug Fix
react-scripts: Fix ESLint 6 support (@ianschmitz)
react-scripts: Don't block static files in robots.txt (@iansu)
:nail_care: Enhancement
eslint-config-react-app: Ignore "jsx-a11y/aria-role" for React components (@deftomat)
Migrating from 3.1.0 to 3.1.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.1.1
or
yarn add --exact react-scripts@3.1.1
3.1.0
9 Aug 2019- Breaking
react-scripts: Fix RegExp from navigateFallbackBlacklist (workbox) (@nuragic)
- Breaking
react-scripts: Update url-loader to 2.0.1 (@heyimalex)
- Breaking
eslint-config-react-app, react-error-overlay, react-scripts: Add ESLint 6 support (@mrmckeb)
v3.1.0 is a minor release that adds ESLint 6 support as well as experimental support for extending and customizing the ESLint config along with other minor bug fixes and documentation updates.
Highlights
ESLint 6
Experimental ESLint config customization
More Jest config options
Option to configure or disable image inlining
:rocket: New Feature
eslint-config-react-app, react-error-overlay, react-scripts: Add ESLint 6 support (@mrmckeb)
eslint-config-react-app, react-scripts: Add ESLint extend support to eslint-loader (@mrmckeb)
react-dev-utils: Handle browser arguments (@arvigeus)
react-scripts: Add environment variable to control image inlining threshold (@peterbe)
react-scripts: Support for graceful extension of Jest config (@jamesmfriedman)
:boom: Breaking Change
- Breaking
react-scripts: Fix RegExp from navigateFallbackBlacklist (workbox) (@nuragic)
- Breaking
react-scripts: Update url-loader to 2.0.1 (@heyimalex)
- Breaking
eslint-config-react-app, react-error-overlay, react-scripts: Add ESLint 6 support (@mrmckeb)
:bug: Bug Fix
react-dev-utils: Fix for #6720: HMR not working in Firefox if proxy option present (@dmile)
react-scripts: Resolve relative paths for preprocessor styles (@iamandrewluca)
react-scripts: Add explicit check for --watchAll=false (@mrmckeb)
react-scripts: Update url-loader to 2.0.1 (@heyimalex)
eslint-config-react-app: jsx-no-duplicate-props ignore case fix (@rommguy)
eslint-config-react-app: fix: eslintrc overrides key should be an array, not object (@ivan-aksamentov)
eslint-config-react-app: Adjust typescript-eslint to not warn about typedefs when used before defined (@vincentjames501)
react-error-overlay, react-scripts: Upgrade webpack to 4.35.0 to fix dynamic import issue (@iansu)
:nail_care: Enhancement
react-scripts: add readonly modifier for css module (@xiaoxiangmoe)
react-scripts: bump sass-loader (@xiaoxiangmoe)
react-scripts: Fix RegExp from navigateFallbackBlacklist (workbox) (@nuragic)
react-scripts: Support configuring coveragePathIgnorePatterns (@kentcdodds)
react-scripts: 100% lighthouse score for progressive web app (@dscanlan)
react-scripts: Set jsonpFunction by default (@sibiraj-s)
react-scripts: Typescript init: suggest
jsx: "react"in tsconfig (@kingdaro)react-scripts: Append title element to SVG component via title prop (@sudkumar)
react-dev-utils: Add vscodium to the editor list (@leonardodino)
react-dev-utils: Handle browser arguments (@arvigeus)
eslint-config-react-app, react-error-overlay, react-scripts: Add ESLint 6 support (@mrmckeb)
eslint-config-react-app: Disabled Typescript no-undef rule per typescript-eslint #477 (@andyhopp)
create-react-app: Fix compatibility of create-react-app to Node.js v0.10+ (@tobiasbueschel)
:memo: Documentation
Other
Adjusted deployment documentation for ZEIT Now (@leo)
Added dependencies to bootstrap article when using custom SCSS. (@eclectic-coding)
Update testing-library related npm package names in README (@balazsorban44)
Add question issue template (@iansu)
Docs: remove an outdated TypeScript-related note (@MidnightDesign)
proposal dynamic import are stage 4 (@gespispace)
docs(svg): add tip for title props accessibility (@sudkumar)
Update minimum Node versions in docs (@JESii)
Fix typo (@mvasin)
Docs: replace the command line to install relay/macro (@soufDev)
Update deprecated package reference (@bnewcomb)
Make the OOM abreviation more clear (@tlehtimaki)
Improve breaking changes info for CRA 3.0.0 (@falldowngoboone)
Correct spelling of browserslist (@amyrlam)
docs: fix env-cmd example in deployment section (@VMois)
Updates the relay docs (@orta)
eslint-config-react-app: Update README for ESLint config (@mrmckeb)
eslint-config-react-app: Update peer dependencies (@ThewBear)
:house: Internal
babel-preset-react-app: Remove unused dependencies in babel-preset-react-app (@iansu)
babel-preset-react-app: Use correct babel transform for dynamic import in dependencies (@jamesknelson)
react-scripts: Add explicit check for --watchAll=false (@mrmckeb)
react-scripts: Upgrade svgr to 4.2.0 (@iansu)
Other
Attempt at fixing CI issue on windows (@heyimalex)
Update issue templates (@mrmckeb)
Disable Travis build (@ianschmitz)
Add Azure DevOps build pipeline (@ianschmitz)
Add test to make sure .d.ts files are ignored when checking for TypeScript (@iansu)
:hammer: Underlying Tools
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: Bump dependencies (@ianschmitz)
eslint-config-react-app, react-error-overlay, react-scripts: Add ESLint 6 support (@mrmckeb)
eslint-config-react-app, react-scripts: Add ESLint extend support to eslint-loader (@mrmckeb)
react-scripts: Append title element to SVG component via title prop (@sudkumar)
react-scripts: Update @typescript-eslint package versions (@ianschmitz)
react-scripts: Update fsevents dependency version (@eps1lon)
react-dev-utils: fix: Replaced opn (deprecated) with open (@jamesgeorge007)
Migrating from 3.0.1 to 3.1.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.1.0
or
yarn add --exact react-scripts@3.1.0
3.0.1
8 May 2019- Breaking
babel-preset-react-app: Update dependencies of Babel preset with recent changes (@skoging)
- Removed
react-scripts: Remove
Object.assignfromMiniCssExtractPluginoptions (@swashcap) react-error-overlay, react-scripts: Unpin
babel-jest(@ianschmitz)
v3.0.1 is a maintenance release that adjusts some ESLint rules for TypeScript along with other minor bug fixes and documentation updates.
:boom: Breaking Change
- Breaking
babel-preset-react-app: Update dependencies of Babel preset with recent changes (@skoging)
:bug: Bug Fix
react-error-overlay, react-scripts: Unpin
babel-jest(@ianschmitz)react-error-overlay, react-scripts: Temporary fix for
babel-jestpreflight error (@ianschmitz)eslint-config-react-app: Disable
no-dupe-class-membersrule for TypeScript (@ianschmitz)eslint-config-react-app: Fix
no-useless-constructorrule in TypeScript (@ianschmitz)eslint-config-react-app, react-scripts: Disable
default-caselint rule for TypeScript (@ianschmitz)react-dev-utils: Change cssmodule classname hash to use relative paths (@vg-stan)
:nail_care: Enhancement
react-dev-utils, react-scripts: Adds the configuration for PnP/Typescript (@arcanis)
babel-preset-react-app: Update dependencies of Babel preset with recent changes (@skoging)
react-scripts: Generate SVG component name in Jest fileTransform (@dallonf)
react-scripts: Remove body padding reset from templates (@Hurtak)
:memo: Documentation
Other
Add note to restart the dev server after changing .env file (@MostafaNawara)
Add clarifying note to TypeScript docs warning about global install of CRA (@methodbox)
Update GraphQL docs (@nagman)
Call to action button now reacts to being hovered (@joerez)
Fix typo in deployment docs (@david-cho-lerat-HL2)
react-app-polyfill: Update README.md (@david-cho-lerat-HL2)
:house: Internal
- Removed
react-scripts: Remove
Object.assignfromMiniCssExtractPluginoptions (@swashcap)
Migrating from 3.0.0 to 3.0.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.0.1
or
yarn add --exact react-scripts@3.0.1
3.0.0
22 Apr 2019- Breaking
react-scripts: Remove no-watch flag in favor of watchAll=false (@bugzpodder)
- Breaking
react-scripts: Add custom function to generate asset manifest (@iansu)
- Breaking
react-scripts: change NODE_ENV and PUBLIC_URL into readonly (@xiaoxiangmoe)
Create React App 3.0 brings some exciting new features including support for Hooks!
Thanks to all the maintainers and contributors who worked so hard on this release! :tada:
Highlights
Jest 24
Hooks support
TypeScript linting
browserslistsupport in @babel/preset-envAbsolute imports using
jsconfig.json/tsconfig.json
Migrating from 2.1.x to 3.0.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@3.0.0
or
yarn add --exact react-scripts@3.0.0
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@3.0.0contains a few 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.Jest 24
We've updated from Jest 23 to get the latest improvements in Jest 24. We've noticed some differences in snapshot serialization in Jest 24, so you may need to adjust your tests slightly once you update. You can read more about what's changed in the Jest 24 blog post.
Hooks support
We now enforce Rules of Hooks with
eslint-plugin-react-hooks. If you are breaking any of the rules of Hooks this will cause your build to fail.TypeScript linting
We now lint TypeScript files. You can see the list of rules we enforce to check if your project is compatible. If you're using Visual Studio Code you can follow our guide to setup up your editor to display lint warnings.
browserslistsupport in @babel/preset-envThe
browserslistconfig in yourpackage.jsonis now used to control the output of your JavaScript files. You can use separate configuration fordevelopmentandproduction. See here for a good starting point which gives a good development experience, especially when using language features such as async/await, but still provides high compatibility with many browsers in productionRemove --no-watch flag
We've removed the
--no-watchflag from thestartscript in favor of Jest's own--watchAll=false.New structure in
asset-manifest.jsonAll asset paths have been moved under the
fileskey inasset-manifest.json.New Features
using
jsconfig.json/tsconfig.jsonWe now support setting
baseUrlinjsconfig.jsonandtsconfig.json. To configurebaseUrlto point to thesrcdirectory in your JavaScript project, create ajsconfig.jsonfile in your project root:```json { "compilerOptions": { "baseUrl": "src" }, "include": ["src"] } ```If you have a TypeScript project you can configure
baseUrlthe same way in yourtsconfig.json.Currently the only supported options for
baseUrlarenode_modules(the default) andsrc.PostCSS Normalize
You can now include a version of Normalize.css in your project that will use your
browserslistsetting to generate the appropriate styles for your target browsers. To include it simply add@import-normalizeat the top of one of your CSS files.Detailed Changelog
:rocket: New Feature
react-scripts: Set baseUrl from jsconfig.json/tsconfig.json (@rovansteen)
react-scripts: Adds PostCSS Normalize (@mrchief)
babel-plugin-named-asset-import, confusing-browser-globals, react-dev-utils, react-error-overlay, react-scripts: Update to Jest 24 (@loryman)
eslint-config-react-app, react-scripts: Add TypeScript linting support (@ianschmitz)
babel-preset-react-app, eslint-config-react-app, react-scripts: Support React Hooks (#5602) (@eivind88)
babel-preset-react-app, react-dev-utils, react-scripts: Support browserslist in @babel/preset-env (@ianschmitz)
:boom: Breaking Change
- Breaking
react-scripts: Remove no-watch flag in favor of watchAll=false (@bugzpodder)
- Breaking
react-scripts: Add custom function to generate asset manifest (@iansu)
- Breaking
react-scripts: change NODE_ENV and PUBLIC_URL into readonly (@xiaoxiangmoe)
- Breaking
react-scripts: Remove --coverage + --watch workaround for the test command (@stipsan)
- Breaking
react-scripts: Allow .json type checking (@ianschmitz)
- Breaking
react-scripts: Add custom function to generate asset manifest (@iansu)
- Breaking
babel-preset-react-app, react-app-polyfill: Update to core-js@3 (@ianschmitz)
- Breaking
babel-plugin-named-asset-import, confusing-browser-globals, react-dev-utils, react-error-overlay, react-scripts: Update to Jest 24 (@loryman)
- Breaking
eslint-config-react-app, react-scripts: Add TypeScript linting support (@ianschmitz)
- Breaking
babel-preset-react-app, eslint-config-react-app, react-scripts: Support React Hooks (#5602) (@eivind88)
- Breaking
babel-preset-react-app, react-dev-utils, react-scripts: Support browserslist in @babel/preset-env (@ianschmitz)
:bug: Bug Fix
react-dev-utils: InlineChunkHtmlPlugin works with empty publicPath (@ItalyPaleAle)
react-scripts: fix: terser-webpack-plugin hanging on WSL (@endiliey)
react-scripts: Convert JSON.stringify \n to os.EOL (@MikeBeaton)
create-react-app: Fix unlogged yarn pnp message (@heyimalex)
:nail_care: Enhancement
react-scripts: Change CRA version in
react-scriptseject warning. (@lffg)react-scripts: Add custom function to generate asset manifest (@iansu)
react-scripts: Fix react-scripts peer-deps link local issue (@transitive-bullshit)
react-scripts: Replace deprecated SFC with FunctionComponent in react-app.d.ts (@iamandrewluca)
react-scripts: Suggests that tsconfig.json is incorrect only when SyntaxError is caught (@Andarist)
react-scripts: Enable futureEmitAssets in webpack config (@iansu)
react-scripts: Remove unnecessary shrink-to-fit=no meta data (@abdelrahmanrifai)
react-scripts: Add empty mock for http2 (@kjin)
react-scripts: add command to add files to staging after eject (@clickclickonsal)
react-scripts: Allow .json type checking (@ianschmitz)
react-scripts: change class component to function component (@xiaoxiangmoe)
babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, create-react-app, eslint-config-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Add directory details to packages/* package.json (@feelepxyz)
babel-preset-react-app, react-app-polyfill: Update to core-js@3 (@ianschmitz)
create-react-app: Warn when using react-scripts-ts (@ianschmitz)
react-dev-utils: Add wait: false to options object for opn (@evalexpr)
react-dev-utils: Enable click to go to error in console part 2! (@johnnyreilly)
:memo: Documentation
Other
Add baseUrl documentation (@ianschmitz)
Copy fixes in adding Bootstrap docs (@panckreous)
Fix docs about minimum React version for SVG component support (@iansu)
Add link to TypeScript page in Getting Started (@ianschmitz)
Clarify production build output files documentation (@bakuzan)
Add SVG support dependency note (@pnarielwala)
Update link to React Testing Library docs (@fjoshuajr)
Add Render deployment section (@anurag)
Add explanation for adding everything as dependencies to docs (@mikeattara)
Document .graphql and .gql file loading with graphql.macro (@petetnt)
Update advanced-configuration.md (@stephengodderidge)
Add deployment instructions with AWS Amplify (@swaminator)
Add note about npx caching and link to #6119 (@TaylorBriggs)
Revert removal of newlines from html in docs (@JBallin)
- Removed
react-scripts: Remove no-watch flag in favor of watchAll=false (@bugzpodder)
:house: Internal
Other
Upgrade to Lerna v3 (@iansu)
Add temporary workaround for Babel dependency issues in kitchensink-eject test suite (@iansu)
Add temporary workaround for Babel dependency issues in installs test suite (@iansu)
Kill verdaccio in CI tasks cleanup (@santoshyadav198613)
Remove duplicate url key in siteConfig (@charpeni)
react-scripts: Update testMatch to also be compatible with Jest 24 (@ngbrown)
react-scripts: Remove --coverage + --watch workaround for the test command (@stipsan)
react-scripts: Change app component declaration from arrow function to regular function (@iansu)
react-scripts: change named import into default import (@xiaoxiangmoe)
react-scripts: make compiler a const not a let (@Primajin)
babel-plugin-named-asset-import, confusing-browser-globals, react-dev-utils, react-error-overlay, react-scripts: Cleanup Jest config (@ianschmitz)
react-dev-utils: Remove unused eslint comment (@mohitsinghs)
eslint-config-react-app: Sync version of babel-eslint in eslint-config-react-app for react-scripts V3 (@dalcib)
:hammer: Underlying Tools
react-scripts: Update fsevents dependency version (@FrancoisRmn)
react-scripts: Update to workbox-webpack-plugin v4 (@r0ughnex)
react-scripts: Updating html-webpack-plugin dep (@Aftabnack)
react-scripts: Update webpack-dev-server to 3.2.1 (@ThePrez)
babel-plugin-named-asset-import, babel-preset-react-app, confusing-browser-globals, create-react-app, eslint-config-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Relax ESLint version range (@ianschmitz)
babel-preset-react-app: Remove unused babel-loader from babel-preset-react-app (@tlrobinson)
babel-preset-react-app, react-dev-utils, react-error-overlay, react-scripts: Update dependency versions (@ianschmitz)
react-dev-utils: Update fork-ts-checker-webpack-plugin out of alpha (@pelotom)
- Removed
eslint-config-react-app: Remove project property from @typescript-eslint/parser options (@jackwilsdon)
eslint-config-react-app, react-scripts: Unpin eslint-config-react-hooks dependency (@iansu)
babel-preset-react-app, eslint-config-react-app, react-scripts: Support React Hooks (#5602) (@eivind88)
babel-preset-react-app, create-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Upgrade dependencies (@ianschmitz)
- 2.x
2.1.8
7 Mar 2019v2.1.8 is a maintenance release that reapplies the TypeScript speed improvements (#6406) in a new major version of
react-dev-utils.v2.1.8 is a maintenance release that reapplies the TypeScript speed improvements (#6406) in a new major version of
react-dev-utils.Migrating from 2.1.7 to 2.1.8
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.8
or
yarn add --exact react-scripts@2.1.8
2.1.7
7 Mar 2019v2.1.7 is a maintenance release that temporarily reverts the TypeScript speed improvements (#6406) to fix a dependency issue in
react-dev-utils.v2.1.7 is a maintenance release that temporarily reverts the TypeScript speed improvements (#6406) to fix a dependency issue in
react-dev-utils.Migrating from 2.1.6 to 2.1.7
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.7
or
yarn add --exact react-scripts@2.1.7
2.1.6
6 Mar 2019:rocket: Reduced TypeScript rebuild times while running the development server. This was previously introduced in v2.1.4 but had to be reverted. Thanks to @ianschmitz for getting this ready.
react-dev-utils: Fix deploy instructions to make link clickable. (@sbimochan)
react-scripts: Revert CSS sourcemaps in development. (@bugzpodder)
v2.1.6 is a maintenance release that brings a few new improvements, most notably:
:rocket: Reduced TypeScript rebuild times while running the development server. This was previously introduced in v2.1.4 but had to be reverted. Thanks to @ianschmitz for getting this ready.
:bug: Bug Fix
react-dev-utils: Fix deploy instructions to make link clickable. (@sbimochan)
react-scripts: Revert CSS sourcemaps in development. (@bugzpodder)
react-scripts: Revert "Switch to eval-source-map (#5060)". (@ianschmitz)
:nail_care: Enhancement
react-dev-utils, react-scripts: Speed up TypeScript rebuild times in development. (@ianschmitz)
create-react-app: Only use
yarn.lock.cachedif using the default Yarn registry. (@hangryCat)react-scripts: Add forward ref to React SVG Component. (@GasimGasimzada)
:memo: Documentation
babel-preset-react-app: Improve Flow and TypeScript usage docs. (@saranshkataria)
babel-preset-react-app, confusing-browser-globals, react-app-polyfill: Improve language used in markdown code blocks. (@cherouvim)
Other
Update
source-map-explorerdocs to analyze all chunks. (@Kamahl19)Fix typo. (@DenrizSusam)
Add information about using custom registries in e2e testing #4488. (@juanpicado)
react-dev-utils, react-scripts: Convert all bit.ly links from http to https. (@leighhalliday)
:hammer: Underlying Tools
react-scripts: Use contenthash instead of chunkhash for better long-term caching. (@ianschmitz)
Other
Upgrade Docusaurus and enable new features. (@yangshun)
Migrating from 2.1.5 to 2.1.6
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.6
or
yarn add --exact react-scripts@2.1.6
2.1.5
11 Feb 2019v2.1.5 is a maintenance release that reverts the TypeScript speed improvements (#5903) to fix a dependency issue in
react-dev-utils.v2.1.5 is a maintenance release that reverts the TypeScript speed improvements (#5903) to fix a dependency issue in
react-dev-utils.Migrating from 2.1.4 to 2.1.5
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.5
or
yarn add --exact react-scripts@2.1.5
2.1.4
10 Feb 2019:rocket: Reduced TypeScript rebuild times while running the development server. TypeScript is now blazing fast! Special thanks to @deftomat and @johnnyreilly and the other contributors for their hard work on this.
Jest type ahead support which provides a much nicer experience when filtering your tests using the Jest CLI
And many more improvements!
v2.1.4 is a maintenance release that brings a number of awesome improvements. A few notable ones include:
:rocket: Reduced TypeScript rebuild times while running the development server. TypeScript is now blazing fast! Special thanks to @deftomat and @johnnyreilly and the other contributors for their hard work on this.
Jest type ahead support which provides a much nicer experience when filtering your tests using the Jest CLI
And many more improvements!
:bug: Bug Fix
react-scripts: Use semicolons in the ProcessEnv interface. (@DominikPalo)
react-scripts: Prevent cursor events on app-logo svg. (@kostadriano)
:nail_care: Enhancement
react-scripts: Add Jest typeahead plugin. (@gaearon)
react-scripts: Sass source map for dev. (@zhuoli99)
react-scripts: Allow react-scripts test --no-watch. (@ricokahler)
react-scripts: Enable eval-source-map for firefox. (@jasonLaster)
react-dev-utils, react-scripts: Speed up TypeScript projects. (@deftomat)
:memo: Documentation
Other
Update docs links to prefer HTTPS for supported domains. (@ianschmitz)
[docs] Warn/clarify that env vars are NOT "SECRET". (@JBallin)
Update ZEIT Now deployment instructions. (@timothyis)
Minor issue in README.md. (@nathanlschneider)
Update docs to document
--no-watch. (@ricokahler)Update
serveport flag and add example. (@lyzhovnik)Updating updating-to-new-releases.md for users who installed CRA globally. (@carpben)
Changes to steps for publishing GitHub User Page. (@StevenTan)
Add note for global install of CLI. (@ianschmitz)
update link for difference between proposal stages. (@loveky)
Remove extra table cell. (@yangshun)
react-scripts: Make manifest.json description more generic. (@chrisself)
:house: Internal
Other
Fix e2e:docker failure with "access denied". (@jamesknelson)
Update local-test.sh to return test exit code. (@dallonf)
Fix CI builds. (@ianschmitz)
react-scripts: Added
moduleto ignored node modules list. (@dotansimha)react-scripts: TypeScript detection filtering 'node_modules'.. (@holloway)
react-dev-utils, react-scripts: dependencies: move chalk to react-dev-utils. (@otaviopace)
babel-plugin-named-asset-import, react-scripts: Upgrade @svgr/webpack to 4.1.0. (@alaycock)
react-dev-utils: Update react-dev-util globby dependency to v8.0.2. (@davidlukerice)
babel-preset-react-app, react-app-polyfill, react-dev-utils, react-error-overlay, react-scripts: Fix CI and upgrade dependencies. (@Timer)
:hammer: Underlying Tools
babel-preset-react-app, react-app-polyfill, react-dev-utils, react-scripts: Upgrade dependencies. (@ianschmitz)
babel-preset-react-app: Update babel-plugin-macros 2.4.4 -> 2.4.5. (@maniax89)
eslint-config-react-app, react-scripts: Bump eslint-plugin-react version and update webpack config. (@ianschmitz)
Migrating from 2.1.3 to 2.1.4
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.4
or
yarn add --exact react-scripts@2.1.4
2.1.3
4 Jan 2019Other
react-scripts: Update webpack-dev-server 3.1.9 -> 3.1.14. (@Friss)
v2.1.3 is a maintenance release to fix a vulnerability in webpack-dev-server.
:memo: Documentation
Other
Correct an error for documentation. (@hardo)
Replace deprecated VSCode launch.json variable. (@raiskila)
Generalize the adding bootstrap documentation. (@jquense)
Remove outdated docs for setting up eslint in editor. (@LukasWerfel)
Fix control comment of CSS Grid prefixing. (@denexapp)
:hammer: Underlying Tools
react-scripts: Update webpack-dev-server 3.1.9 -> 3.1.14. (@Friss)
Migrating from 2.1.2 to 2.1.3
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.3
or
yarn add --exact react-scripts@2.1.3
2.1.2
23 Dec 2018babel-preset-react-app: Add
allowESModulesoption tobabel-preset-react-app(@Pajn)create-react-app: Disable copy to clipboard in
create-react-app --info(@heyimalex)create-react-app: Update envinfo to
5.11.1(@tabrindle)
v2.1.2 is a maintenance release including various bug fixes.
:rocket: New Feature
babel-preset-react-app: Add
allowESModulesoption tobabel-preset-react-app(@Pajn)
:bug: Bug Fix
create-react-app: Disable copy to clipboard in
create-react-app --info(@heyimalex)create-react-app: Update envinfo to
5.11.1(@tabrindle)babel-preset-react-app: Fix TypeScript decorator support (@ianschmitz)
babel-plugin-named-asset-import: Fix named-asset-import plugin to work with export-as syntax (@NShahri)
react-app-polyfill: Don't polyfill fetch for Node (@gshilin)
react-scripts: Version bump
postcss-preset-envto latest (@BPScott)react-scripts: Fix
tsconfig.jsonlib suggested value (@ianschmitz)
:nail_care: Enhancement
react-scripts: Add support for
setupTests.ts(@ianschmitz)
:memo: Documentation
Other
Correct markdown to avoid comment. (@souzasmatheus)
Add example command to create typed project. (@mbelsky)
Make links to docs consistent in README. (@iansu)
Add production build section to docs. (@ianschmitz)
Use https for linked images to fix mixed content warnings. (@iansu)
Docs: update localStorage mock in “Running Tests”. (@phacks)
Add SASS_PATH instructions to Sass stylesheet docs. (@jayantbh)
Add default values to
file_extnote. (@alaycock)Update README.md with updated link about PWAs. (@wuweiweiwu)
Some Grammar fixes. (@nikhilknoldus)
Fix link to page about running tests. (@wsmoak)
React native repository updated in
README.md. (@pavinthan)Rename 'getting started' link to 'docs'. (@kulek1)
docs: Simplify installing Storybook with
npx(@sagirk)docs: Change story book command to
sb init(@andys8)Add PR welcoming badge (@open-source-explorer)
Suggest Encore when not building a SPA with Symfony (@dunglas)
Updated the link to firebase hosting (@githubsaturn)
Fixed link to manifest.json file (@m4jing)
Fix public folder documentation link (@makovkastar)
eslint-config-react-app: Updated docs for
.eslintrc(@ManoelLobo)babel-preset-react-app, create-react-app, eslint-config-react-app, react-dev-utils, react-scripts: Update links to docs in all package README files (@iansu)
react-scripts: Improve advice in
verifyPackageTree.js(@sjalgeo)react-scripts: Add pre-eject message about new features in v2 (@iansu)
react-scripts: Add placeholders to template README for bit.ly links (@iansu)
react-app-polyfill: Note that extra polyfills must be included manually (@ajwann)
:house: Internal
react-scripts: Add
webpsupport for TypeScript. (@dugagjin)react-scripts: Suggest a different default for speed reasons. (@Timer)
react-scripts: Run prettier on HTML files. (@sibiraj-s)
react-scripts: Merge webpack configuration. (@Timer)
react-scripts: Add permissive TS lib defaults. (@Timer)
Other
Added extension to
.eslintrc(@ManoelLobo)Add the latest stable node version. (@noelyoo)
react-dev-utils: Correct some comments. (@mjackson)
react-dev-utils: fix: make typescriptformatter support 0.5 of fork checker. (@SimenB)
react-error-overlay: fix: add
sideEffects: falseto react-error-overlay. (@SimenB)babel-preset-react-app: Add allowESModules option to babel-preset-react-app. (@Pajn)
create-react-app: ignore intellij module files when generating an app. (@denofevil)
Migrating from 2.1.1 to 2.1.2
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.2
or
yarn add --exact react-scripts@2.1.2
2.1.1
1 Nov 2018- Breaking
Update minimum node version to 8.10 in README. (@iansu)
babel-preset-react-app: Add support for decorators. (@Timer)
react-scripts: fix 'Duplicate string index signature' in ProcessEnv. (@xiaoxiangmoe)
Happy Halloween 🎃 👻! This spooky release brings a treat: decorator support in TypeScript files!
:bug: Bug Fix
babel-preset-react-app: Add support for decorators. (@Timer)
react-scripts: fix 'Duplicate string index signature' in ProcessEnv. (@xiaoxiangmoe)
:nail_care: Enhancement
babel-preset-react-app: Add support for decorators. (@Timer)
:memo: Documentation
- Breaking
Update minimum node version to 8.10 in README. (@iansu)
:house: Internal
react-error-overlay: Expose
reportRuntimeError. (@hipstersmoothie)babel-plugin-named-asset-import: add tests for named-asset-imports plugin. (@NShahri)
react-scripts: Make serviceWorker config argument optional in typescript. (@eddedd88)
Migrating from 2.1.0 to 2.1.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.1
or
yarn add --exact react-scripts@2.1.1
2.1.0
30 Oct 2018- Removed
react-scripts: Remove unsupported options. (@Timer)
create-react-app, react-scripts: Add TypeScript app creation (@Timer)
babel-preset-react-app, react-scripts: TypeScript support using Babel 7 (@brunolemos)
Create React App 2.1 adds support for TypeScript! Read the documentation to get started.
New applications can be created using TypeScript by running:
$ npx create-react-app my-app --typescript
:rocket: New Feature
create-react-app, react-scripts: Add TypeScript app creation (@Timer)
babel-preset-react-app, react-scripts: TypeScript support using Babel 7 (@brunolemos)
:bug: Bug Fix
react-scripts: Remove react-scripts type reference on eject. (@Timer)
react-scripts: Ignore json files from TypeScript type checking. (@brunolemos)
- Removed
react-scripts: Remove unsupported options. (@Timer)
react-scripts: Ignore test files from reported type errors. (@Timer)
react-scripts: Update react-app.d.ts. (@brunolemos)
react-scripts: Add typings for process.env. (@brunolemos)
react-scripts: Use TypeScript parser to read tsconfig.json. (@brunolemos)
react-scripts: Update Workbox dependency. (@jeffposnick)
react-dev-utils, react-scripts: Automatically setup TypeScript when detected. (@Timer)
react-dev-utils, react-scripts: Respect tsconfig.json extends when validating config. (@ianschmitz)
:nail_care: Enhancement
create-react-app, react-scripts: Refine how TypeScript types are handled. (@Timer)
react-scripts: Enable TypeScript json module resolver. (@brunolemos)
react-scripts: Validate tsconfig when using TypeScript. (@Timer)
react-scripts: Check for TypeScript install in preflight. (@Timer)
react-scripts: Always type check TypeScript when being used. (@Timer)
react-dev-utils, react-scripts: Add TypeScript error formatting. (@Timer)
:memo: Documentation
Other
Fixing Internal Links. (@ehfeng)
Add Algolia search bar to Docusaurus. (@amyrlam)
Simplified TypeScript steps. (@brunolemos)
Add "edit" feature to Docusaurus pages. (@amyrlam)
Fix title on Safari. (@yuyokk)
Fix typo. (@noelyoo)
Fixed typo in getting-started. (@jessepeterman)
Add some headings to the getting started section. (@selbekk)
Add SoMe links to documentation. (@selbekk)
react-scripts: Update doc links in template README. (@iansu)
react-scripts: Remove dot from the end of the link to fix it when using from GitHub. (@ranyitz)
:house: Internal
react-scripts: Turn on certain TypeScript options. (@Timer)
react-scripts: Change import syntax from typescript declaration. (@brunolemos)
react-scripts: Avoid pushing .pnp folder to git. (@NShahri)
react-scripts: Update Workbox dependency. (@jeffposnick)
eslint-config-react-app: Fixing the code splitting links in the ESLint output. (@jheijmans)
Migrating from 2.0.5 to 2.1.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.1.0
or
yarn add --exact react-scripts@2.1.0
2.0.4
14 Oct 2018react-scripts: Fix code minifying (@Timer)
react-scripts: Fix
GENERATE_SOURCEMAPenv not working for css sourcemap (@crux153)babel-preset-react-app: Disable Symbol typeof transform (@gaearon)
:bug: Bug Fix
react-scripts: Fix code minifying (@Timer)
react-scripts: Fix
GENERATE_SOURCEMAPenv not working for css sourcemap (@crux153)babel-preset-react-app: Disable Symbol typeof transform (@gaearon)
:nail_care: Enhancement
create-react-app: Caches the Yarn resolution for faster installs (@arcanis)
create-react-app: Adds a version check when using --use-pnp (@arcanis)
react-scripts: Add
.mjssupport back to webpack (@Timer)
:memo: Documentation
Other
removed create-react-app-parcel link (@lockround)
Update README links for CSS modules and SASS (@yuyokk)
Set the color palette to something a bit more React-y (@selbekk)
Update favicon and OpenGraph images (@selbekk)
5238 Removing sample pages (@selbekk)
Set the project name and owner correctly (@selbekk)
5238 removing blog from Docusaurus (@selbekk)
Initial setup of Docusaurus (@amyrlam)
react-scripts: Revert change to http-proxy-middleware docs (@iansu)
react-scripts: Fix usage of http-proxy-middleware (@banyan)
react-scripts: DOCS: Add Relay example (@zachasme)
2.0.3
3 Oct 2018- Breaking
I couldn't find a
proxykey inpackage.json - Breaking
The value of
proxyis a string (e.g.http://localhost:5000) - Breaking
The value of
proxyis an object
Create React App 2.0 brings a year’s worth of improvements in a single dependency update.
We summarized all of the changes in a blog post!Check it out: Create React App 2.0: Babel 7, Sass, and More.
It provides a high-level overview of new features and improvements. Now let's see how to update your app to the latest version in detail.
Migrating from 1.x to 2.0.3
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@2.0.3
or
yarn add --exact react-scripts@2.0.3
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 (maybe Sass or CSS Modules?) is now supported out of the box. You can find a list of notable new features in the Create React App 2.0 blog post.
Breaking Changes
Like any major release,
react-scripts@2.0contains a few breaking changes. We expect that they won't affect every user, but we recommend to scan over these sections to see if something is relevant to you. If we missed something, please file a new issue.Node 6 is no longer supported
Please upgrade to Node 8 (LTS) or later.
Polyfills for IE 9, IE 10, and IE 11 are no longer included by default (but you can opt in!)
We have dropped default support for Internet Explorer 9, 10, and 11. If you still need to support these browsers, follow the instructions below.
First, install
react-app-polyfill:npm install react-app-polyfill
or
yarn add react-app-polyfill
Next, place one of the following lines at the very top of
src/index.js:import 'react-app-polyfill/ie9'; // For IE 9-11 support import 'react-app-polyfill/ie11'; // For IE 11 support
You can read more about these polyfills here.
Dynamic
import()of a CommonJS module now has a.defaultpropertyWebpack 4 changed the behavior of
import()to be closer in line with the specification.Previously, importing a CommonJS module did not require you specify the default export. In most cases, this is now required.
If you see errors in your application about... is not a function, you likely need to update your dynamic import, e.g.:const throttle = await import('lodash/throttle'); // replace with const throttle = await import('lodash/throttle').then(m => m.default);require.ensure()is superseded by dynamicimport()We previously allowed code splitting with a webpack-specific directive,
require.ensure(). It is now disabled in favor ofimport(). To switch toimport(), follow the examples below:Single Module
require.ensure(['module-a'], function() { var a = require('module-a'); // ... }); // Replace with: import('module-a').then(a => { // ... });Multiple Module
require.ensure(['module-a', 'module-b'], function() { var a = require('module-a'); var b = require('module-b'); // ... }); // Replace with: Promise.all([import('module-a'), import('module-b')]).then(([a, b]) => { // ... });The default Jest environment was changed to
jsdomLook at the
testentry in thescriptssection of yourpackage.json.
Here's a table how to change it from "before" and "after", depending on what you have there:1.x (if you have this...) 2.x (...change it to this!) react-scripts test --env=jsdomreact-scripts testreact-scripts testreact-scripts test --env=nodeObject
proxyconfiguration is superseded bysrc/setupProxy.jsTo check if action is required, look for the
proxykey inpackage.jsonand follow this table:- Breaking
I couldn't find a
proxykey inpackage.jsonNo action is required!
- Breaking
The value of
proxyis a string (e.g.http://localhost:5000)No action is required!
- Breaking
The value of
proxyis an objectFollow the migration instructions below.
It's worth highlighting: if your
proxyfield is astring, e.g.http://localhost:5000, or you don't have it, skip this section. This feature is still supported and has the same behavior.If your
proxyis an object, that means you are using the advanced proxy configuration. It has become fully customizable so we removed the limited support for the object-style configuration. Here's how to recreate it.First, install
http-proxy-middlewareusing npm or Yarn:npm install http-proxy-middleware
or
yarn add http-proxy-middleware
Next, create
src/setupProxy.jsand place the following contents in it:const proxy = require('http-proxy-middleware'); module.exports = function(app) { // ... };Now, migrate each entry in your
proxyobject one by one, e.g.:"proxy": { "/api": { "target": "http://localhost:5000/" }, "/*.svg": { "target": "http://localhost:5000/" } }Place entries into
src/setupProxy.jslike so:const proxy = require('http-proxy-middleware'); module.exports = function(app) { app.use(proxy('/api', { target: 'http://localhost:5000/' })); app.use(proxy('/*.svg', { target: 'http://localhost:5000/' })); };You can also use completely custom logic there now! This wasn't possible before.
.mjsfile extension support is removedChange the extension of any files in your project using
.mjsto just.js.It was removed because of inconsistent support from underlying tools. We will add it back after it stops being experimental, and Jest gets built-in support for it.
PropTypesdefinitions are now removed in productionNormally, this shouldn't affect your logic and should make the resulting bundle smaller. However, you may be relying on PropTypes definition for production logic. This is not recommended, and will break now. If a library does it, one possible solution is to file an issue in it with a proposal to use a different field (not
propTypes) to signal that the declaration needs to be retained.Anything missing?
This was a large release, and we might have missed something.
Please file an issue and we will try to help.
Migrating from 2.0.0-next.xyz
If you used 2.x alphas, please follow these instructions.
Detailed Changelog
For a readable summary of the changes, check out our blog post.
For the detailed changelog, please see CHANGELOG.md.
- 1.x
1.3.0
6 Mar 2017create-react-appreact-scriptsreact-dev-utils
:bug: Bug Fix
create-react-appreact-scriptsreact-dev-utilsFix
openBrowser()whenBROWSER=openon macOS. (@bpierre)Improve reliability of port detection. (@chrisdrackett)
:nail_care: Enhancement
eslint-config-react-app,react-scriptsAdd support for
ignoreRestSiblingsinno-unused-vars. (@chrisdrackett)Linter no longer warns when using rest properties to remove variables from an object.
Bump
jsx-a11yversion. (@bondz)
react-dev-utils,react-scriptsExtract generic build functions into
react-dev-utils. (@viankakrisna)
Other
Stub
package.jsonfor e2e test. (@matoilic)
:memo: Documentation
react-scripts: Update now.sh deployment instructions. (@replaid)
react-scripts: Add docs for Apache client side routing. (@viankakrisna)
react-scripts: Suggest to use
.envfor enabling polling mode. (@gaearon)react-scripts: Fixed missing
--recursiveflag in firstnpm run watch-csscommand. (@mklemme)
:house: Internal
react-scripts: Fix eject for linked react-scripts. (@tuchk4)
react-scripts: Fix internal linting setup. (@gaearon)
eslint-config-react-app: Relax ESLint config peerDependency. (@gaearon)
eslint-config-react-app, react-dev-utils, react-scripts: Lint internal scripts with
eslint:recommended. (@gaearon)react-dev-utils: Don't use ES6 in a file that should run on Node 4. (@gaearon)
Other
Skip AppVeyor CI builds for Markdown changes. (@gaearon)
Add double quotes to escape spaces in paths in e2e. (@viankakrisna)
Upgrade
lernaversion. (@viankakrisna)
Migrating from 0.9.3 to 0.9.4
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact react-scripts@0.9.4
You may also optionally update the global command-line utility for scoped package support:
npm install -g create-react-app@1.3.0
1.2.1
28 Feb 2017create-react-app: Fall back to Yarn offline cache when creating a new project. (@voxsim)
If you are using Yarn, and you have created at least one app previously, Create React App now works offline.
react-scripts: Temporarily disable ESLint caching because of a bug. (@gaearon)
create-react-app: Delete project folder on failed installation on Windows. (@johann-sonntagbauer)
:rocket: New Feature
create-react-app: Fall back to Yarn offline cache when creating a new project. (@voxsim)
If you are using Yarn, and you have created at least one app previously, Create React App now works offline.
:bug: Bug Fix
react-scripts: Temporarily disable ESLint caching because of a bug. (@gaearon)
create-react-app: Delete project folder on failed installation on Windows. (@johann-sonntagbauer)
create-react-app: Validate project name before creating a project. (@johann-sonntagbauer)
create-react-app: Make sure React dependencies aren’t pinned in new projects. (@johann-sonntagbauer)
:nail_care: Enhancement
react-scripts: Add
X-FORWARDEDheaders for proxy requests. (@johann-sonntagbauer)
:memo: Documentation
react-scripts: Tweak the Visual Studio Code debugging guide. (@ryansully)
:house: Internal
End-to-end Tests
Add Windows CI tests for better stability. (@Timer)
Migrating from 0.9.2 to 0.9.3
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact react-scripts@0.9.3
You may also optionally update the global command-line utility for offline Yarn cache support:
npm install -g create-react-app@1.2.1
1.2.0
28 Feb 20171.1.0
26 Feb 2017react-scriptsreact-error-overlaycreate-react-app
:rocket: New Feature
react-scriptsAdd support for variable expansion in
.envfiles. (@moos)
react-error-overlayAllow the error overlay to be unregistered. (@Timer)
create-react-appAdd
--infoflag to help gather bug reports. (@tabrindle)Add
--use-npmflag to bypass Yarn even on systems that have it. (@tabrindle)Extend
--scripts-versionto include.tar.gzformat. (@SaschaDens)Allowing
"file:<path>"--scripts-versionvalues. (@GreenGremlin)
:bug: Bug Fix
babel-preset-react-app,react-scriptsFix object destructuring inside an array on Node 6. (@gaearon)
react-dev-utilsDetach browser process from the shell on Linux. (@gaearon)
Use proxy for all request methods other than
GET. (@doshisid)Print full directory name from
lsof. (@rmccue)Fix broken console clearing on Windows. (@danielverejan)
Fix starting a project in directory with
++in the name. (@Norris1z)
create-react-appFix offline installation to respect proxy from
.npmrc. (@mdogadailo)
react-scripts
:nail_care: Enhancement
react-scriptsPrint when
HOSTenvironment variable is set. (@iansu)Add a localhost-only log message pointing folks to the PWA docs. (@jeffposnick)
Improve eject message. (@xjlim)
create-react-appAllow more non-conflicting files in initial project directory. (@GreenGremlin)
react-dev-utilsAdd link to deployment docs after build. (@viankakrisna)
Add
code-insidersto the editor list. (@shrynx)Add editor support for Sublime Dev & VSCode Insiders. (@yyx990803)
Autodetect MacVim editor. (@gnapse)
react-dev-utils,react-error-overlayOpen editor to exact column from build error overlay. (@tharakawj)
react-dev-utils,react-scriptsSupport setting
noneinREACT_EDITORenvironment variable. (@raerpo)
eslint-config-react-appRelax
no-cond-assignrule. (@gaearon)
:memo: Documentation
User Guide
Add info about service-worker and HTTP caching headers into Firebase section. (@bobrosoft)
Add Powershell commands to README.md. (@Gua-naiko-che)
Better documentation for setupTests.js when ejecting. (@dannycalleri)
Add link for automatic deployment to azure. (@ulrikstrid)
Update README.md. (@maecapozzi)
Link to an explanation for forking react-scripts. (@gaearon)
Document adding a router. (@gaearon)
Fix typo in the User Guide. (@qbahers)
Update README.md. (@elie222)
Use safer/more aesthetic syntax for setting environment variables on Windows. (@cdanielsen)
Updated Debugging Tests for VSCode. (@amadeogallardo)
Fixed typo in webpack.config.dev.js. (@nmenglund)
Updates comment to reflect codebase. (@rahulcs)
Update User Guide with deploying to GitHub User pages. (@aaronlna)
Update Prettier editor integration link. (@gaving)
Fix dead links. (@vannio)
Docs: How to Debug Unit Tests. (@MattMorgis)
Other
Update README.md to note Neutrino's support of react components. (@eliperelman)
Documentation to help windows contributors. (@Dubes)
Add link to nvm-windows. (@davidgilbertson)
eslint-config-react-appFix broken link to
href-no-hasheslint rule. (@hazolsky)
:house: Internal
Other
Enable Yarn check files. (@Timer)
Clean up changes to npm and yarn registry in E2E tests. (@viankakrisna)
Use private registry in E2E tests. (@Timer)
Always use Yarn on CI. (@gaearon)
Port
cra.shdevelopment task to javascript. (@ianschmitz)Simplify waiting for app start in E2E tests. (@xjlim)
Switch to Yarn Workspaces. (@gaearon)
Try updating Flow. (@gaearon)
Export
dismissRuntimeErrorsfunction. (@skidding)Cleaning up
printHostingInstructionsa bit. (@GreenGremlin)Fix
FileSizeReporterfor multi build Webpack setups. (@iiska)Refactor extra watch options regex to
react-dev-utils. (@xjlim)
Migrating from 1.0.17 to 1.1.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact react-scripts@1.1.0
or
yarn add --exact react-scripts@1.1.0
1.0.4
11 Feb 2017react-error-overlay: Fix a regression in published package.
:bug: Bug Fix
react-error-overlay: Fix a regression in published package.
Migrating from 1.0.3 to 1.0.4
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact react-scripts@1.0.4
or
yarn add --dev --exact react-scripts@1.0.4
1.0.3
9 Jan 2017react-dev-utils: Don’t serve the development version from public IPs by default. (@Timer)
eslint-config-react-app: Disable
flowtype/require-valid-file-annotationlint rule due to false positives. (@Robdel12)react-dev-utils, react-error-overlay: Wrap more
consolecalls into a check. (@BrodaNoel)
:bug: Bug Fix
react-dev-utils: Don’t serve the development version from public IPs by default. (@Timer)
eslint-config-react-app: Disable
flowtype/require-valid-file-annotationlint rule due to false positives. (@Robdel12)react-dev-utils, react-error-overlay: Wrap more
consolecalls into a check. (@BrodaNoel)react-scripts: Fix a "File not found" false positive. (@gaearon)
Migrating from 1.0.2 to 1.0.3
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact react-scripts@1.0.3
or
yarn add --dev --exact react-scripts@1.0.3
1.0.2
11 Dec 2016react-dev-utils,react-scriptsreact-dev-utils,react-error-overlayreact-dev-utils
:bug: Bug Fix
react-dev-utils,react-scriptsServe a no-op service worker in development to ensure it doesn't cache the production build even if it was served on the same port. (@jeffposnick)
react-dev-utils,react-error-overlayWrap console calls into a check for IE9. (@gaearon)
react-dev-utilsAdd Windows Subsystem for Linux support to the error overlay. (@noinkling)
Fix a missing package dependency. (@GreenGremlin)
:nail_care: Enhancement
react-scriptsEjecting should ensure you have clean
git status. (@milocosmopolitan)Only enable host check if you use proxy, and add a way to opt out of it. (@gaearon)
:house: Internal
Migrating from 1.0.1 to 1.0.2
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact react-scripts@1.0.2
or
yarn add --dev --exact react-scripts@1.0.2
If you previously had issues with an
Invalid Host Headererror, follow these new instructions to fix it.1.0.1
8 Dec 2016react-scripts: Fix
NODE_PATH=srcfornpm startandnpm run build. (@ApacheEx)react-scripts: Fix
NODE_PATH=srcfor Jest. (@gaearon)react-scripts: Fix Windows path issue for generated service worker. (@gaearon)
:bug: Bug Fix
react-scripts: Fix
NODE_PATH=srcfornpm startandnpm run build. (@ApacheEx)react-scripts: Fix
NODE_PATH=srcfor Jest. (@gaearon)react-scripts: Fix Windows path issue for generated service worker. (@gaearon)
react-scripts: Additional fix to service worker config for
"homepage"field. (@gaearon)react-scripts: Ignore
.env.localintestenvironment. (@gaearon)react-scripts: Gracefully shut down the development server on signals. (@gaearon)
react-dev-utils: Show customized build path for serve instruction. (@chyipin)
react-dev-utils, react-error-overlay: Add missing package dependency. (@Timer)
react-error-overlay: Fix a crash when switching errors with arrow keys. (@Gandem)
:nail_care: Enhancement
eslint-config-react-app: Turn off
operator-assignmentstylistic rule. (@gaearon)react-scripts: Add
<noscript>to template'sindex.html. (@viankakrisna)
:memo: Documentation
react-scriptsFix broken links. (@enguerran)
Update readme with example of Sass include path. (@kellyrmilligan)
Hide React Storybook from the User Guide while it's incompatible. (@gaearon)
Correct docs on which
.env.*files are supported. (@AJamesPhillips)
:house: Internal
react-scriptsFix a bug for empty
NODE_PATH. (@gaearon)
Migrating from 1.0.0 to 1.0.1
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact react-scripts@1.0.1
or
yarn add --dev --exact react-scripts@1.0.1
1.0.0
3 Dec 2016- Breaking
react-dev-utils, react-scripts: Add
ModuleScopePluginto ensure files reside insrc/. (@Timer) - Breaking
react-scripts: Ignore Moment.js locales by default. (@gaearon)
We’ve been working on this release for the past few months, and there are many big impovements, from migrating to webpack 2 to a brand new runtime error overlay and built-in support for Progressive Web Apps.
So instead of just enumerating them here, we decided to write a blog post about all the new features.
Check it out: What’s New in Create React App.
Have you read it? Now let's see how to update your app to the latest version.
Migrating from 0.9.5 to 1.0.0
First, ensure you are using the latest Node 6 LTS or newer. In 1.0.0, we have dropped support for Node 4 and NPM 2.
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact react-scripts@1.0.0
You may also optionally update the global command-line utility for bug fixes:
npm install -g create-react-app
Ensure application and test files reside in
src/We've never supported importing files from outside
src/, nor have we supported running tests outside ofsrc/.
We also never explicitly forbid doing so, which caused confusion when things didn't work like they should.When running or building your application, you may see a message like so:
You attempted to import ... which falls outside of the project src/ directory.
To remedy this, simply move any files that you
importwithinsrc/and update your relative imports accordingly. This enforces that files thatimporteach other stay insrc/, and other folders serve different purposes (e.g. thepublic/folder just gets served from the root).If you used relative imports outside the project directory as a way to share code with another project, consider using a monorepo instead, so that other projects are symlinked to your project's
node_modules/. Then you can import them as a Node modules.While running
npm test, you may notice some of your tests are missing. Please move any top-level test directory (i.e.__test__,__spec__) or files (i.e.*.test.js,*.spec.js) intosrc/. Conversely, if you have some similarly named files that you don’t want Jest to run, move them outside ofsrc/.Import required locales for Moment.js
Moment.js locales are now purposely excluded from the bundle unless explicitly depended on.
Please import the locales you need:
import moment from 'moment'; import 'moment/locale/fr'; import 'moment/locale/es';
You can no longer import file content
You can no longer import a file and expect to receive its contents as an encoded string.
This behavior was confusing and inconsistent depending on the file size.Importing files with unknown extensions will now always include them into the build and return a valid URL.
If you'd like to import a file's contents as a string, consider contributing to #1944.
For the time being, you must embed assets within an export:// sample.txt export default `i want this data as a string `;
You can then import this as so:
import sampleText from './sample.txt'; // ...
Confusing window globals can no longer be used without
windowqualifierPlease prefix any global method with
window., you may experience this with methods such asconfirm.Simply update references from
confirmtowindow.confirm.Note that this new lint error will likely uncover legitimate accidental uses of global variables where you meant to define a local variable instead.
Why is my import erroring out?
You can no longer use AMD import syntax, nor define an import anywhere other than the top of the file.
This is to reduce confusion around import statements, which do not allow you to evaluate code between them.
I see many accessibility warnings
We have enabled a new set of rules to help make applications more accessible, please take time to learn about the errors and fix them.
You can search for every lint rule name in the right column and read its description on the web. The fixes are usually very simple.
I see many warnings about PropTypes and createClass
We have enabled the lint warnings about React APIs deprecated in React 15.5.
You can automatically convert your project to fix them by running the corresponding codemods.How do I make my tests work with Jest 20?
Please refer to the Jest 19 and Jest 20 breaking changes for migration instructions.
If you use snapshots, you will likely need to update them once because of the change in format.
Flexbox 2009 spec is no longer polyfilled
The old, 2009 specification for Flexbox is deprecated and is 2.3x slower than the latest specification.
We are no longer polyfilling it automatically.
I see "Definition for rule 'jsx-a11y/alt-text' was not found (jsx-a11y/alt-text)" in the editor
Follow these steps if you see errors about missing lint rules in the editor.
Ensure that in your editor ESLint settings you have "Use Global ESLint" turned off
Run
npm installin your project (oryarn)Quit your editor completely (ensure its process doesn't hang around)
Start the editor again
If you still have the problem please file an issue.
How to turn my app into a Progressive Web App?
After the regular update procedure above, add these line to
<head>inpublic/index.html:<meta name="theme-color" content="#000000"> <!-- manifest.json provides metadata used when your web app is added to the homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/ --> <link rel="manifest" href="%PUBLIC_URL%/manifest.json">Then create a file called
public/manifest.jsonthat looks like this:{ "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "192x192", "type": "image/png" } ], "start_url": "./index.html", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" }Finally, create
src/registerServiceWorker.jswith this template, import it fromsrc/index.jsand call the function it exports.Anything missing?
This was a large release, and we might have missed something.
Please file an issue and we will try to help.
Some of my tests started crashing because of unhandled rejections
Unhandled Promise rejections will now crash tests. You can fix them by explicitly catching the errors you don’t care about.
Detailed Changelog
For a readable summary of the changes, check out our blog post.
:boom: Breaking Change
- Breaking
react-dev-utils, react-scripts: Add
ModuleScopePluginto ensure files reside insrc/. (@Timer) - Breaking
react-scripts: Ignore Moment.js locales by default. (@gaearon)
- Breaking
- Breaking
react-scripts: Some flexbox bugs are autofixed, and support for 2009 spec is dropped. (@cr101)
- Breaking
react-scripts: Upgrade to Jest
19(now 20). (@rogeliog) - Breaking
react-scripts: Whitelist files that can be embedded through url-loader. (@pugnascotia)
- Breaking
eslint-config-react-app, react-dev-utils: Tweak lint rules. (@gaearon)
- Breaking
eslint-config-react-app, react-error-overlay, react-scripts: Upgrade
eslint-plugin-jsx-a11yand activate more rules. (@AlmeroSteyn) - Breaking
eslint-config-react-app, react-scripts: Confusing global variables are now blacklisted. (@doshisid)
:rocket: New Feature
react-scripts: Scaffolded applications are now Progressive Web Apps by default. (@jeffposnick)
react-scripts: Support multiple env configuration files. (@tuchk4)
react-scripts: Enable CSS sourcemaps in production. (@gaearon)
react-scripts: Make subset of Jest options overridable. (@ryansully)
react-dev-utils, react-scripts: Add
react-error-overlay, our new crash overlay. (@Timer)react-dev-utils, react-scripts: Support specifying a node script as BROWSER environment variable. (@GAumala)
react-dev-utils, react-scripts: Support multiple proxies in development. (@jamesblight)
eslint-config-react-app, react-scripts: Upgrade
eslint-plugin-jsx-a11yand activate more rules. (@AlmeroSteyn)
:bug: Bug Fix
react-scripts: Improve interaction between compile and runtime overlays (@gaearon)
react-scripts: Disable Uglify reduce_vars. (@gaearon)
react-scripts: Support hoisting
react-scriptsand addrequire.resolve()to loaders. (@gaearon)react-scripts: Do not respect
.eslintignore. (@Timer)react-scripts: Ignore yarn cache directory when searching for tests. (@jmorrell)
react-scripts: Name development chunk names. (@herrstucki)
react-scripts: Minify CSS post-webpack 2. (@viankakrisna)
react-scripts: Resolve
localhostwhen offline (Windows). (@bunshar)react-scripts: Bind to host environment variable. (@GAumala)
react-scripts: Ensure proxy url starts with
http://orhttps://. (@bunshar)react-scripts: Upgrade
detect-port. (@Andreyco)react-scripts: Fix default responsive behavior in iOS 9+. (@GreenGremlin)
react-scripts: Makes end-to-end testing crash on unhandled rejections. (@dbismut)
react-scripts: Fixes a silent crash when ejecting. (@gaearon)
react-scripts: Fix ejecting from a scoped fork. (@gaearon)
react-dev-utils:
openBrowsernow supports urls with more than one parameter. (@alisonmonteiro)react-dev-utils: Fix
openBrowser()whenBROWSER=openon macOS. (@bpierre)react-dev-utils: Fix an edge-case for people with the username
cwd. (@chrisdrackett)create-react-app: Check internet connectivity with lookup instead of resolve. (@kdleijer)
create-react-app: Show package name in CLI. (@mkazantsev)
create-react-app: Properly extract package name for installing a tgz of scoped packages. (@Timer)
create-react-app: Add diagnostic code. (@tgig)
create-react-app: Fix project cleanup on Windows. (@johann-sonntagbauer)
create-react-app: Add project name validation. (@johann-sonntagbauer)
create-react-app: Fix react dependency versions during initial install. (@johann-sonntagbauer)
:nail_care: Enhancement
react-dev-utils, react-scripts: Refactor and improve build output. (@gaearon)
react-dev-utils, react-scripts: Tweak error and warning output. (@gaearon)
react-dev-utils, react-scripts: Replace prompt function Inquirer.js. (#1767). (@iansu)
react-dev-utils, react-scripts: Extract generic build functions to react-dev-utils. (@viankakrisna)
react-dev-utils, react-error-overlay: Tweak error overlay styles. (@bvaughn)
react-scripts: Ignore Moment.js locales by default. (@gaearon)
react-scripts: Adding plugin postcss-flexbugs-fixes and flexbox: 'no-2009' to Autoprefixer. (@cr101)
react-scripts: Upgrade to Jest
19(now 20). (@rogeliog)react-scripts: Removed redundant UglifyJS options. (@marcofugaro)
react-scripts: Suggest
yarn buildinstead ofyarn run build. (@geoffdavis92)react-scripts: Suggest
servefor running in production. (@leo)react-scripts: Display
yarninstead ofyarnpkgwhen creating a new application. (@lpalmes)react-scripts: Modularise scripts. (@djgrant)
react-scripts: Add
X-FORWARDEDheaders for proxy requests. (@johann-sonntagbauer)eslint-config-react-app, react-dev-utils: Tweak lint rules. (@gaearon)
react-error-overlay, react-scripts: Use Jest 20. (@gaearon)
babel-preset-react-app, eslint-config-react-app, react-dev-utils, react-error-overlay, react-scripts: Bump dependencies. (@gaearon)
eslint-config-react-app: Removing a stylistic lint rule. (@anilreddykatta)
eslint-config-react-app: disable ignoring unused vars prefixed with _. (@doshisid)
eslint-config-react-app: Relax label rules (Closes #1835). (@anilreddykatta)
eslint-config-react-app: Remove 'guard-for-in' lint rule. (@spicyj)
eslint-config-react-app, react-scripts: Blacklist confusing global variables. (@doshisid)
eslint-config-react-app, react-scripts: Bump jsx-a11y version. (@bondz)
eslint-config-react-app, react-scripts: Add support for
ignoreRestSiblingsinno-unused-vars. (@chrisdrackett)react-dev-utils: Only show the first compilation error. (@gaearon)
react-dev-utils: Omit ESLint warnings when there are ESLint errors. (@gaearon)
react-dev-utils: Prettify errors and warnings for Webpack 2. (@gaearon)
react-dev-utils: Modularize and extract crash overlay to iframe. (@Timer)
create-react-app: Allow creation of apps in empty Mercurial repos. (@GreenGremlin)
Other
:memo: Documentation
react-scripts: Remove live-editing since isn't accurate. (@cesarvarela)
react-scripts: Update Sass README. (@kellyrmilligan)
react-scripts: Fixed link for storybook. (@scottrangerio)
react-scripts: Fix instructions for serving with now. (@davidascher)
react-scripts: Clarify
.eslintrceffects. (@luftywiranda13)react-scripts: Suggest to create
.eslintrcfor IDE lint plugins. (@gaearon)react-scripts: Fix Netlify heading level. (@benpickles)
react-scripts: Suggest
node-sassalternative. (@michaelwayman)react-scripts: Update doc server example to work from any directory. (@isramos)
react-scripts: Update information in User Guide for Enzyme dependency. (@josephrace)
react-scripts: Suggest Yarn in HTML template. (@tmos)
react-scripts: User Guide: Removed blockquote from code section, due to markdown conflict. (@stochris)
react-scripts: Add Yarn steps for adding flow. (@zertosh)
react-scripts: Update now.sh deployment instructions. (@replaid)
react-scripts: Add docs for apache's client side routing setting. (@viankakrisna)
react-scripts: Suggest to use
.envfor enabling polling mode. (@gaearon)react-scripts: Fixed missing --recursive flag in first
npm run watch-csscommand. (@mklemme)react-scripts: Set Chrome userDataDir to be under .vscode folder. (@ryansully)
Other
Add note about
yarn.lock. (@viankakrisna)Fix typo. (@tijwelch)
Add folder structure docs for new contributors. (@anilreddykatta)
Add sku to the list of alternatives. (@markdalgleish)
Improve phrasing. (@moniuch)
babel-preset-react-app: Update side-effect documentation. (@evenchange4)
:house: Internal
react-scripts: Use some ES6 syntax. (@shashkovdanil)
react-scripts: Add linked modules test. (@Timer)
react-scripts: Fix eject for linked react-scripts. (@tuchk4)
react-scripts: Fix internal linting setup. (@gaearon)
react-scripts: Remove unused
urlimport in Webpack config. (@pd4d10)react-scripts: Update extract-text-webpack-plugin to stable. (@SimenB)
react-dev-utils, react-scripts: Move more logic from react-scripts to react-dev-utils. (@gaearon)
react-dev-utils, react-scripts: Add custom eslint formatter. (@doshisid)
babel-preset-react-app, react-scripts: Resolve regenerator runtime relative to react-scripts. (@gaearon)
babel-preset-react-app, react-scripts: Re-disable babel modules transform. (@Timer)
babel-preset-react-app, react-scripts: Switch to preset-env. (@Timer)
create-react-app, react-dev-utils, react-scripts: Bump minimal Node version to 6. (@ianschmitz)
Other
Fix AppVeyor CI. (@darrenscerri)
Added test to check for accidental extraneous dependencies. (@lpalmes)
Fix AppVeyor CI. (@darrenscerri)
Skip AppVeyor CI builds for Markdown changes. (@gaearon)
Add double quotes to escape spaces in paths in e2e. (@viankakrisna)
Pin and upgrade lerna version. (@viankakrisna)
Add
appveyor.yml. (@Timer)
babel-preset-react-app, create-react-app, eslint-config-react-app, react-dev-utils, react-scripts: Update to modern code style (ES6). (@tuchk4)
eslint-config-react-app: Relax ESLint config peerDependency. (@gaearon)
eslint-config-react-app, react-dev-utils, react-scripts: Lint internal scripts with eslint:recommended. (@gaearon)
react-dev-utils: Don't use ES6 in a file that should run on Node 4. (@gaearon)
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.