Releases: facebook/create-react-app
v3.4.0
3.4.0 (2020-02-14)
v3.4.0 is a minor release that adds new features, including support for SSL and setting PUBLIC_URL
in development. It also includes a fix for Hot Module Reloading with CSS Modules as well as other bug fixes.
🐛 Bug Fix
react-scripts
create-react-app
,react-dev-utils
,react-error-overlay
- #8439 Downgrade chalk for ie 11 support (@ianschmitz)
react-dev-utils
- #8292 Fixes unchecked access to 'deploy' script on build (@renato-bohler)
cra-template-typescript
,cra-template
- #8272 Handle service worker error in Firefox (@rosinghal)
cra-template-typescript
💅 Enhancement
react-dev-utils
,react-scripts
- #8442 fix(react-scripts): do not redirect served path if request may proxy (@iamandrewluca)
- #7259 feat(react-scripts): allow PUBLIC_URL in develoment mode (@iamandrewluca)
- #7750 Enable custom sockjs pathname for hot reloading server. (@heygrady)
cra-template-typescript
cra-template-typescript
,cra-template
- #8272 Handle service worker error in Firefox (@rosinghal)
react-scripts
- #5845 Add option to provide custom ssl certificates during development (@alexbrazier)
📝 Documentation
cra-template-typescript
,cra-template
,react-dev-utils
,react-error-overlay
,react-scripts
- Other
🔨 Underlying Tools
react-dev-utils
- #8459 update open to v7.0.2 (@vince1995)
- #7948 Support JetBrains Rider IDE as an editor (@djpowell)
- #8367 Wider Chromium support for openBrowser (@handeyeco)
react-scripts
- #8282 Run git init before template dependencies are installed (@lukaszfiszer)
- Other
- #8402 fix(test): force install npm in e2e-behaviour (@iamandrewluca)
Committers: 18
- Alex Brazier (@alexbrazier)
- Andrew Luca (@iamandrewluca)
- Cassidy Williams (@cassidoo)
- Christopher Button (@devgeist)
- David Powell (@djpowell)
- Eugene Chybisov (@chybisov)
- Eugene Sviridov (@esvyridov)
- Grady Kuhnline (@heygrady)
- Ian Schmitz (@ianschmitz)
- Kevin Pham (@keevan)
- Lewis Llobera (@lewislbr)
- Martin Litvaj (@Kamahl19)
- Matthew Curtis (@handeyeco)
- Renato Böhler (@renato-bohler)
- Rohit Singhal (@rosinghal)
- Vincent Semrau (@vince1995)
- Łukasz Fiszer (@lukaszfiszer)
- 吕立青 (@JimmyLv)
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
v3.3.1
3.3.1 (2020-01-31)
v3.3.1 is a maintenance release that includes minor bug fixes and documentation updates.
🐛 Bug Fix
cra-template
react-scripts
- #8281 Fix sass importLoaders (@mariusc23)
- #8099 Add titleProp to SVGR ReactComponent type definition (@rhnorskov)
- #8028 fix(react-scripts): proactively append to .gitignore during generation (@bmuenzenmeyer)
- #8106 Fix CSS font-face minification (@sidonaldson)
babel-preset-react-app
- #8120 Sync dependencies babel config (@ianschmitz)
react-dev-utils
- #8116 Add slashes to WebSocket protocol URL (@Baael)
- #8079 webpackHotDevClient now uses wss when https is used (@mikecaulley)
💅 Enhancement
react-error-overlay
- #6548 Add helpful message to the footer (@pyrogenic)
cra-template-typescript
cra-template-typescript
,cra-template
,react-scripts
- #8219 Add template support for any package.json keys (#8082) (@tomvalorsa)
create-react-app
- #8298 Support shorthand scoped templates (@kevin940726)
- #8168 Add current version and bin location to --info output (@heyimalex)
cra-template-typescript
,cra-template
- #8194 Replace favicon in templates (@heyimalex)
eslint-config-react-app
📝 Documentation
- Other
- #8380 docs: Add troubleshooting documentation on ENOSPC (@huchenme)
- #8394 Update docs according to lint-staged v10 (@lukyth)
- #8307 Remove outdated docs regarding vscode eslint extension and typescript autofix (@alex-vukovity-cko)
- #8247 Update setting-up-your-editor.md (@dev-xu)
- #8092 Update custom template docs with instructions for testing custom template locally (@kevinold)
- #8293 Minor grammatical edit (@egrim)
- #8212 Little typo (@sonyarianto)
- #8147 update PWA docs links to point to template package (@peet)
- #8132 Add package-runner note to readme (@JeromeDeLeon)
- #8111 chore: update docusaurus & tweak site (@endiliey)
- #8080 Fix typo in CHANGELOG.md (@Trontor)
- #8077 Add custom-templates to docs sidebar (@ianschmitz)
babel-preset-react-app
🏠 Internal
create-react-app
- #8178 Minor refactors in create-react-app (@heyimalex)
🔨 Underlying Tools
babel-preset-react-app
,create-react-app
,react-dev-utils
,react-error-overlay
,react-scripts
- #8353 Remove outdated babel plugins (@ianschmitz)
- #8324 Update Dependencies (@RDIL)
- #8122 Fix CI build (@ianschmitz)
react-dev-utils
- #8364 Downgrade open from 7.0.0 to 6.4.0 (@vince1995)
- #8163 Bump pkgUp (@andriijas)
babel-plugin-named-asset-import
- #8171 Bump babel-plugin-tester and fix breaking changes (@andriijas)
create-react-app
,react-app-polyfill
,react-dev-utils
,react-error-overlay
,react-scripts
- #8176 Bump internal dependencies (@andriijas)
create-react-app
,react-dev-utils
,react-error-overlay
- #8164 Bump chalk (@andriijas)
react-error-overlay
,react-scripts
Committers: 29
- Alex Guerra (@heyimalex)
- Alex James Vukovity (@alex-vukovity-cko)
- Andreas Cederström (@andriijas)
- Boyuan Xu (@dev-xu)
- Brian Muenzenmeyer (@bmuenzenmeyer)
- Endi (@endiliey)
- Evan Grim (@egrim)
- Hu Chen (@huchenme)
- Ian Schmitz (@ianschmitz)
- Jerome De Leon (@JeromeDeLeon)
- Joshua Pollak (@pyrogenic)
- Kai Hao (@kevin940726)
- Kanitkorn Sujautra (@lukyth)
- Kevin Old (@kevinold)
- Marius Craciunoiu (@mariusc23)
- Mike Caulley (@mikecaulley)
- Peet Goddard (@peet)
- Rasmus Nørskov (@rhnorskov)
- Reece Dunham (@RDIL)
- Sean Zhu (@szhu)
- Simon Donaldson (@sidonaldson)
- Sony AK (@sonyarianto)
- Tom Valorsa (@tomvalorsa)
- Tomoya Fujita (@tomoyaf)
- Vadzim (@vadzim)
- Vincent Semrau (@vince1995)
- Wojciech Zieliński (@Baael)
- @Retsam
- @Trontor
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
v3.3.0
3.3.0 (2019-12-04)
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-template
and cra-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 --typescript
in 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 typescript
dependency to 3.7.0
or 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 Version
of 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 TypeScript 3.7.0
or 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"
}
}
🚀 New Feature
babel-preset-react-app
- #7438 Add optional chaining and nullish coalescing operators support (@renatoagds)
babel-preset-react-app
,react-dev-utils
- #7817 Add numeric separator support (@tharun208)
cra-template-typescript
,cra-template
,create-react-app
,react-scripts
💥 Breaking Change
-
create-react-app
,react-dev-utils
,react-scripts
-
#7988 Bump webpack-dev-server (@ianschmitz)
NOTE: This is only a breaking change if you're using
react-dev-utils
outside of Create React App.
-
🐛 Bug Fix
eslint-config-react-app
create-react-app
react-scripts
- #7860 Mark TypeScript as an optional peer dependency for react-scripts (@dstaley)
- #7822 Fix absolute paths issue in Jest (@rovansteen)
- #7796 Fixed process type in TypeScript template. (@fuszenecker)
react-dev-utils
💅 Enhancement
cra-template-typescript
,cra-template
- #8005 Prefix apple-touch-icon links with PUBLIC_URL (@benblank)
- #7881 Add @testing-library to the default templates (@kentcdodds)
react-scripts
- #7989 Add scripts support to templates (@mrmckeb)
- #7921 Add restoreMocks to supported jest config keys (@ianschmitz)
- #6352 Add additional information for postcss errors (#6282) (@buildbreakdo)
- #6753 Add Service-Worker header to checkValidServiceWorker (@darthmaim)
- #7832 feat: add additional Jest keys to whitelist (@mrmckeb)
- #7022 Fix node_modules sourcemap config (which will fix VSCode debugging of CRA apps) (@justingrant)
cra-template
create-react-app
,react-error-overlay
- #7052 Dark scheme overlay (@Fabianopb)
babel-preset-react-app
📝 Documentation
- Other
- #8050 Update template docs (@mrmckeb)
- #7995 Add contributors section to readme (@ianschmitz)
- #7896 chore: Fix broken link for e2e README (@haruelrovix)
- #7874 Bump docusaurus 🦖 (@andriijas)
- #7819 📖 DOC: Improvement (@waahab)
- #7853 Update adding-bootstrap.md (@Xuhao)
- #7849 chore: update README.md gif links (@cchanxzy)
- #7840 Link to ASP.NET Core docs (@Daniel15)
- #7841 Update getting-started.md (@reactjser)
- #7809 Add a note about .eslintignore files being respected (@seanlaff)
- #7686 Link to React documentation for code splitting (@Hugodby)
- #7785 Upgrade to docusaurus 2 (@endiliey)
- #7824 Fix grammar error in troubleshooting.md (@jakeboone02)
- #7823 Document correct default behavior for HOST var (@jsejcksn)
- #7815 Tightens up the TypeScript docs (@orta)
- #7813 Clarify dynamic import stage in docs (@aprilandjan)
react-dev-utils
,react-scripts
- [#7972](https://github.c...
v3.2.0
3.2.0 (2019-10-03)
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.
🚀 New Feature
react-scripts
- #7737 Support production profiling with React Developer Tools (@JacobMGEvans)
react-dev-utils
,react-scripts
- #6931 Adds TSC_COMPILE_ON_ERROR env var... (@kylebebak)
🐛 Bug Fix
react-scripts
- #7754 Fix linting error when using rest props (@alexandrtovmach)
react-app-polyfill
💅 Enhancement
react-scripts
- #7687 Use installing package manager in README (@ashr81)
- #7755 Support setting baseUrl to root directory (@rovansteen)
- #7530 only load eslint config when EXTEND_ESLINT environment variable is specified/ do not swallow eslint config errors (@n1ru4l)
- #7742 set output.globalObject to 'this' (@kentcdodds)
- #7721 Add "entrypoints" key to asset manifest (@samuelmeuli)
- #7562 enable .eslintignore again (@igtm)
react-dev-utils
- #6980 Stop hiding the column number of ESLint errors (@justingrant)
📝 Documentation
- #7302 docs: note that 2 to 3 migration may require deletion of node_modules (@kimpers)
- #7757 Documentation typo fix: accessbile→accessible (@tomer)
- #7601 [Documentation] Updated list of supported Jest config overrides (@neilbryson)
- #7705 Update runtime chunk name separator in docs (@samuelmeuli)
🏠 Internal
react-scripts
react-dev-utils
,react-scripts
🔨 Underlying Tools
react-scripts
- #7729 Remove switch case (@andrelmlins)
Committers: 19
- Alexandr Tovmach (@alexandrtovmach)
- André Lins (@andrelmlins)
- Ashrith Reddy (@ashr81)
- Federico Zivolo (@FezVrasta)
- Iguchi Tomokatsu (@igtm)
- Jacob M-G Evans (@JacobMGEvans)
- Jake Moxey (@jxom)
- Justin Grant (@justingrant)
- Kent C. Dodds (@kentcdodds)
- Kim Persson (@kimpers)
- Kyle Bebak (@kylebebak)
- Laurin Quast (@n1ru4l)
- Lewis Llobera (@lewislbr)
- Rakan Nimer (@rakannimer)
- Reece Dunham (@RDIL)
- Robert van Steen (@rovansteen)
- Samuel Meuli (@samuelmeuli)
- Tomer Cohen (@tomer)
- neilbryson (@neilbryson)
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
v3.1.2
3.1.2 (2019-09-19)
v3.1.2 is a maintenance release that includes minor bug fixes and documentation updates.
🐛 Bug Fix
react-scripts
- #7679 Change runtime chunk name separator from tilde to dash (@javadoug)
- #7538 Explicitly checking that EXTEND_ESLINT is true (@BrockWills)
babel-preset-react-app
,react-error-overlay
,react-scripts
- #7662 Fix build (@ianschmitz)
💅 Enhancement
react-scripts
📝 Documentation
- #7616 Update deployment.md with another AWS example (@AndrewBestbier)
- #7663 Remove --single-quote from prettier examples (@brlewis)
- #7659 Update running-tests.md (@weyert)
- #7459 Update troubleshooting.md (@prevostc)
- #7650 Adopt Contributor Covenant (@iansu)
- #7620 cleanup-after-each is no longer necessary! (@iHmD)
- #7613 Fix seams between changelog majors (@emilpalsson)
- #7368 Correcting proxy sample (@szabolcs-szilagyi)
- #7536 add a migration step to remove static from robots.txt (@lookfirst)
- #7521 Show logo for mobile views in create-react-app.dev (@GrooChu)
🏠 Internal
react-scripts
- #7526 The variable dotenvFiles is never reassigned - use const instead (@Primajin)
- #7585 remove trailing spaces (@xiaoxiangmoe)
🔨 Underlying Tools
babel-plugin-named-asset-import
,confusing-browser-globals
,react-app-polyfill
,react-dev-utils
,react-error-overlay
,react-scripts
- #7681 Bump dependencies (@ianschmitz)
react-scripts
- #7531 Upgrade dotenv-expand to fix issues (@DominicTobias)
eslint-config-react-app
,react-scripts
- #7540 Bump version of @typescript-eslint/* (@pierreneter)
Committers: 20
- Andrew (@AndrewBestbier)
- Brock Wills (@BrockWills)
- Clément Prévost (@prevostc)
- Dominic Tobias (@DominicTobias)
- Doug Ross (@javadoug)
- Emil Pålsson (@emilpalsson)
- Federico Zivolo (@FezVrasta)
- Ian Schmitz (@ianschmitz)
- Ian Sutherland (@iansu)
- Jannis Hell (@Primajin)
- Jerome Leclanche (@jleclanche)
- Jon Stevens (@lookfirst)
- Sabesh Rajendran (@GrooChu)
- Tomáš Szabo (@deftomat)
- Weyert de Boer (@weyert)
- ZHAO Jinxiang (@xiaoxiangmoe)
- @brlewis
- @iHmD
- @pierreneter
- szabi (@szabolcs-szilagyi)
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
v3.1.1
3.1.1 (2019-08-13)
v3.1.1 is a maintenance release that includes minor bug fixes and documentation updates.
🐛 Bug Fix
react-scripts
- #7513 Fix ESLint 6 support (@ianschmitz)
- #7508 Don't block static files in robots.txt (@iansu)
💅 Enhancement
📝 Documentation
Committers: 3
- Ian Schmitz (@ianschmitz)
- Ian Sutherland (@iansu)
- Tomáš Szabo (@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
v3.1.0
3.1.0 (2019-08-09)
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: #7415
- Experimental ESLint config customization: #7036
- More Jest config options: #6055
- Option to configure or disable image inlining: #6060
🚀 New Feature
eslint-config-react-app
,react-error-overlay
,react-scripts
eslint-config-react-app
,react-scripts
react-dev-utils
react-scripts
- #6060 Add environment variable to control image inlining threshold (@peterbe)
- #6055 Support for graceful extension of Jest config (@jamesmfriedman)
💥 Breaking Change
react-scripts
- #7176 Fix RegExp from navigateFallbackBlacklist (workbox) (@nuragic)
- #7378 Update url-loader to 2.0.1 (@heyimalex)
eslint-config-react-app
,react-error-overlay
,react-scripts
🐛 Bug Fix
react-dev-utils
react-scripts
- #5829 Resolve relative paths for preprocessor styles (@iamandrewluca)
- #7433 Add explicit check for --watchAll=false (@mrmckeb)
- #7378 Update url-loader to 2.0.1 (@heyimalex)
eslint-config-react-app
- #7230 jsx-no-duplicate-props ignore case fix (@rommguy)
- #7219 fix: eslintrc overrides key should be an array, not object (@ivan-aksamentov)
- #7079 Adjust typescript-eslint to not warn about typedefs when used before defined (@vincentjames501)
react-error-overlay
,react-scripts
💅 Enhancement
react-scripts
- #7497 add readonly modifier for css module (@xiaoxiangmoe)
- #7496 bump sass-loader (@xiaoxiangmoe)
- #7176 Fix RegExp from navigateFallbackBlacklist (workbox) (@nuragic)
- #7080 Support configuring coveragePathIgnorePatterns (@kentcdodds)
- #7482 100% lighthouse score for progressive web app (@dscanlan)
- #5951 Set jsonpFunction by default (@sibiraj-s)
- #7472 Typescript init: suggest
jsx: "react"
in tsconfig (@kingdaro) - #7118 Append title element to SVG component via title prop (@sudkumar)
react-dev-utils
- #7028 Add vscodium to the editor list (@leonardodino)
- #7277 Handle browser arguments (@arvigeus)
eslint-config-react-app
,react-error-overlay
,react-scripts
eslint-config-react-app
create-react-app
- #6941 Fix compatibility of create-react-app to Node.js v0.10+ (@tobiasbueschel)
📝 Documentation
- Other
- #7488 Adjusted deployment documentation for ZEIT Now (@leo)
- #7462 Added dependencies to bootstrap article when using custom SCSS. (@eclectic-coding)
- #7340 Update testing-library related npm package names in README (@balazsorban44)
- #7423 Add question issue template (@iansu)
- #7260 Docs: remove an outdated TypeScript-related note (@MidnightDesign)
- #7372 proposal dynamic import are stage 4 (@gespispace)
- #7374 docs(svg): add tip for title props accessibility (@sudkumar)
- #7182 Update minimum Node versions in docs (@JESii)
- #7317 Fix typo (@mvasin)
- #7262 Docs: replace the command line to install relay/macro (@soufDev)
- #7170 Update deprecated package reference (@bnewcomb)
- #7133 Make the OOM abreviation more clear (@tlehtimaki)
- #7086 Improve breaking changes info for CRA 3.0.0 (@falldowngoboone)
- #7059 Correct spelling of browserslist (@amyrlam)
- #7039 docs: fix env-cmd example in deployment section (@VMois)
- #7041 Updates the relay docs (@orta)
eslint-config-react-app
react-error-overlay
,react-scripts
🏠 Internal
babel-preset-react-app
- #5818 Remove unused dependencies in babel-preset-react-app (@iansu)
- #7208 Use correct babel transform for dynamic import in dependencies (@jamesknelson)
react-scripts
- Other
- #7385 Attempt at fixing CI issue on windows (@heyimalex)
- #7269 Update issue templates (@mrmckeb)
- #7220 Disable Travis build (@ianschmitz)
- #7096 Add Azure DevOps build pipeline (@ianschmitz)
- #6858 Add test to make sure .d.ts files are ignored when checking for TypeScript ([@iansu](https://github.com/ian...
v3.0.1
3.0.1 (2019-05-08)
v3.0.1 is a maintenance release that adjusts some ESLint rules for TypeScript along with other minor bug fixes and documentation updates.
💥 Breaking Change
🐛 Bug Fix
react-error-overlay
,react-scripts
- #7007 Unpin
babel-jest
(@ianschmitz) - #7002 Temporary fix for
babel-jest
preflight error (@ianschmitz)
- #7007 Unpin
eslint-config-react-app
- #6987 Disable
no-dupe-class-members
rule for TypeScript (@ianschmitz) - #6862 Fix
no-useless-constructor
rule in TypeScript (@ianschmitz)
- #6987 Disable
eslint-config-react-app
,react-scripts
- #6937 Disable
default-case
lint rule for TypeScript (@ianschmitz)
- #6937 Disable
react-dev-utils
💅 Enhancement
react-dev-utils
,react-scripts
babel-preset-react-app
react-scripts
📝 Documentation
- Other
- #6979 Add note to restart the dev server after changing .env file (@MostafaNawara)
- #6945 Add clarifying note to TypeScript docs warning about global install of CRA (@methodbox)
- #6898 Update GraphQL docs (@nagman)
- #6810 Call to action button now reacts to being hovered (@joerez)
- #6881 Fix typo in deployment docs (@david-cho-lerat-HL2)
react-app-polyfill
- #6879 Update README.md (@david-cho-lerat-HL2)
🏠 Internal
Committers: 12
- Chris Shaffer (@methodbox)
- Cory Reed (@swashcap)
- Dallon Feldner (@dallonf)
- David Cho-Lerat (@david-cho-lerat-HL2)
- Ian Schmitz (@ianschmitz)
- Joe Rezendes (@joerez)
- Maël Nison (@arcanis)
- Mostafa Nawara (@MostafaNawara)
- Petr Huřťák (@Hurtak)
- Tore Hammervoll (@skoging)
- @nagman
- @vg-stan
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
v3.0.0
3.0.0 (April 22, 2019)
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! 🎉
Highlights
- Jest 24: #6278
- Hooks support: #5997
- TypeScript linting: #6513
browserslist
support in @babel/preset-env: #6608- Absolute imports using
jsconfig.json
/tsconfig.json
: #6656
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.0
contains 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.
browserslist
support in @babel/preset-env
The browserslist
config in your package.json
is now used to control the output of your JavaScript files. You can use separate configuration for development
and production
. 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 production
Remove --no-watch flag
We've removed the --no-watch
flag from the start
script in favor of Jest's own --watchAll=false
.
New structure in asset-manifest.json
All asset paths have been moved under the files
key in asset-manifest.json
.
New Features
using jsconfig.json
/tsconfig.json
We now support setting baseUrl
in jsconfig.json
and tsconfig.json
. To configure baseUrl
to point to the src
directory in your JavaScript project, create a jsconfig.json
file in your project root:
```json
{
"compilerOptions": {
"baseUrl": "src"
},
"include": ["src"]
}
```
If you have a TypeScript project you can configure baseUrl
the same way in your tsconfig.json
.
Currently the only supported options for baseUrl
are node_modules
(the default) and src
.
PostCSS Normalize
You can now include a version of Normalize.css in your project that will use your browserslist
setting to generate the appropriate styles for your target browsers. To include it simply add @import-normalize
at the top of one of your CSS files.
Detailed Changelog
🚀 New Feature
react-scripts
- #6656 Set baseUrl from jsconfig.json/tsconfig.json (@rovansteen)
- #5810 Adds PostCSS Normalize (@mrchief)
babel-plugin-named-asset-import
,confusing-browser-globals
,react-dev-utils
,react-error-overlay
,react-scripts
eslint-config-react-app
,react-scripts
- #6513 Add TypeScript linting support (@ianschmitz)
babel-preset-react-app
,eslint-config-react-app
,react-scripts
babel-preset-react-app
,react-dev-utils
,react-scripts
- #6608 Support browserslist in @babel/preset-env (@ianschmitz)
💥 Breaking Change
react-scripts
- #6848 Remove no-watch flag in favor of watchAll=false (@bugzpodder)
- #6821 Add custom function to generate asset manifest (@iansu)
- #6750 change NODE_ENV and PUBLIC_URL into readonly (@xiaoxiangmoe)
- #4176 Remove --coverage + --watch workaround for the test command (@stipsan)
- #6615 Allow .json type checking (@ianschmitz)
- #6821 Add custom function to generate asset manifest (@iansu)
babel-preset-react-app
,react-app-polyfill
- #6769 Update to core-js@3 (@ianschmitz)
babel-plugin-named-asset-import
,confusing-browser-globals
,react-dev-utils
,react-error-overlay
,react-scripts
eslint-config-react-app
,react-scripts
- #6513 Add TypeScript linting support (@ianschmitz)
babel-preset-react-app
,eslint-config-react-app
,react-scripts
babel-preset-react-app
,react-dev-utils
,react-scripts
- #6608 Support browserslist in @babel/preset-env (@ianschmitz)
🐛 Bug Fix
react-dev-utils
- #6735 InlineChunkHtmlPlugin works with empty publicPath (@ItalyPaleAle)
react-scripts
- #6732 fix: terser-webpack-plugin hanging on WSL (@endiliey)
- #6610 Convert JSON.stringify \n to os.EOL (@MikeBeaton)
create-react-app
- #6759 Fix unlogged yarn pnp message (@heyimalex)
💅 Enhancement
react-scripts
- #6845 Change CRA version in
react-scripts
eject warning. (@lffg) - #6821 Add custom function to generate asset manifest (@iansu)
- #6580 Fix react-scripts peer-deps link local issue (@transitive-bullshit)
- #6746 Replace deprecated SFC with FunctionComponent in react-app.d.ts (@iamandrewluca)
- #6160 Suggests that tsconfig.json is incorrect only when SyntaxError is caught (@Andarist)
- #6696 Enable futureEmitAssets in webpack config (@iansu)
- #6669 Remove unnecessary shrink-to-fit=no meta data (@abdelrahmanrifai)
- #5686 Add empty mock for http2 (@kjin)
- #5960 add command to add files to staging after eject (@clickclickonsal)
- #6615 Allow .json type checking (@ianschmitz)
- #6451 change class component to function component (@xiaoxiangmoe)
- #6845 Change CRA version in
babel-plugin-named-asset-import
,babel-preset-react-app
, `con...
v2.1.8
2.1.8 (March 7, 2019)
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