react-intl-cra
react-intl-cra copied to clipboard
chore(deps): update dependency react-scripts to v2
This PR contains the following updates:
Package | Type | Update | Change | References |
---|---|---|---|---|
react-scripts | dependencies | major | 1.0.17 -> 2.1.8 |
source |
Release Notes
facebook/create-react-app
v2.1.8
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 [email protected]
or
yarn add --exact [email protected]
v2.1.7
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 [email protected]
or
yarn add --exact [email protected]
v2.1.6
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
- #6511 Fix deploy instructions to make link clickable. (@sbimochan)
-
react-scripts
- #6472 Revert CSS sourcemaps in development. (@bugzpodder)
- #6444 Revert "Switch to eval-source-map (#5060)". (@ianschmitz)
:nail_care: Enhancement
-
react-dev-utils
,react-scripts
- #6406 Speed up TypeScript rebuild times in development. (@ianschmitz)
-
create-react-app
-
#6253 Only use
yarn.lock.cached
if using the default Yarn registry. (@hangryCat)
-
#6253 Only use
-
react-scripts
- #5457 Add forward ref to React SVG Component. (@GasimGasimzada)
:memo: Documentation
-
babel-preset-react-app
- #6254 Improve Flow and TypeScript usage docs. (@saranshkataria)
-
babel-preset-react-app
,confusing-browser-globals
,react-app-polyfill
- #6419 Improve language used in markdown code blocks. (@cherouvim)
-
create-react-app
-
react-dev-utils
- #6482 Fix typo. (@mattfwood)
- Other
-
#6438 Update
source-map-explorer
docs to analyze all chunks. (@Kamahl19) - #6454 Fix typo. (@DenrizSusam)
- #5767 Add information about using custom registries in e2e testing #4488. (@juanpicado)
-
#6438 Update
-
react-dev-utils
,react-scripts
- #6239 Convert all bit.ly links from http to https. (@leighhalliday)
:house: Internal
- #6493 Remove AppVeyor config files. (@iansu)
- #6474 Remove latest Node version from Travis config. (@iansu)
:hammer: Underlying Tools
-
react-scripts
- #6387 Use contenthash instead of chunkhash for better long-term caching. (@ianschmitz)
- Other
- #6365 Upgrade Docusaurus and enable new features. (@yangshun)
Committers: 15
- Abdelhadi Dyouri (adyouri)
- Bimochan Shrestha (sbimochan)
- Deniz Susman (DenrizSusam)
- Gasim Gasimzada (GasimGasimzada)
- Ian Schmitz (ianschmitz)
- Ian Sutherland (iansu)
- Ioannis Cherouvim (cherouvim)
- Jack Zhao (bugzpodder)
- Juan Picado @jotadeveloper (juanpicado)
- Leigh Halliday (leighhalliday)
- Martin Litvaj (Kamahl19)
- Matt Wood (mattfwood)
- Meo H. (hangryCat)
- Saransh Kataria (saranshkataria)
- Yangshun Tay (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 [email protected]
or
yarn add --exact [email protected]
v2.1.5
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 [email protected]
or
yarn add --exact [email protected]
v2.1.4
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. (#5903)
- Jest type ahead support which provides a much nicer experience when filtering your tests using the Jest CLI (#5213)
- And many more improvements!
:bug: Bug Fix
-
react-scripts
- #6364 Use semicolons in the ProcessEnv interface. (@DominikPalo)
- #6276 Prevent cursor events on app-logo svg. (@kostadriano)
:nail_care: Enhancement
-
react-scripts
- #5213 Add Jest typeahead plugin. (@gaearon)
- #5713 Sass source map for dev. (@zhuoli99)
- #6285 Allow react-scripts test --no-watch. (@ricokahler)
- #5060 Enable eval-source-map for firefox. (@jasonLaster)
-
react-dev-utils
,react-scripts
- #5903 Speed up TypeScript projects. (@deftomat)
:memo: Documentation
- Other
- #6383 Update docs links to prefer HTTPS for supported domains. (@ianschmitz)
- #6062 [docs] Warn/clarify that env vars are NOT "SECRET". (@JBallin)
- #6359 Update ZEIT Now deployment instructions. (@timothyis)
- #6346 Minor issue in README.md. (@nathanlschneider)
-
#6331 Update docs to document
--no-watch
. (@ricokahler) -
#6229 Update
serve
port flag and add example. (@lyzhovnik) - #6190 Updating updating-to-new-releases.md for users who installed CRA globally. (@carpben)
- #6095 Changes to steps for publishing GitHub User Page. (@StevenTan)
- #6157 Add note for global install of CLI. (@ianschmitz)
- #6149 update link for difference between proposal stages. (@loveky)
- #6141 Remove extra table cell. (@yangshun)
-
react-scripts
- #6355 Make manifest.json description more generic. (@chrisself)
:house: Internal
- Other
- #6050 Fix e2e:docker failure with "access denied". (@jamesknelson)
- #6179 Update local-test.sh to return test exit code. (@dallonf)
- #6165 Fix CI builds. (@ianschmitz)
-
react-scripts
-
#5798 Added
module
to ignored node modules list. (@dotansimha) - #6022 TypeScript detection filtering 'node_modules'.. (@holloway)
-
#5798 Added
-
react-dev-utils
,react-scripts
- #6150 dependencies: move chalk to react-dev-utils. (@otaviopace)
-
babel-plugin-named-asset-import
,react-scripts
- #5816 Upgrade @svgr/webpack to 4.1.0. (@alaycock)
-
react-dev-utils
- #6162 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
:hammer: Underlying Tools
-
babel-preset-react-app
,react-app-polyfill
,react-dev-utils
,react-scripts
- #6393 Upgrade dependencies. (@ianschmitz)
-
babel-preset-react-app
- #6307 Update babel-plugin-macros 2.4.4 -> 2.4.5. (@maniax89)
-
eslint-config-react-app
,react-scripts
- #6132 Bump eslint-plugin-react version and update webpack config. (@ianschmitz)
Committers: 29
- Adam Laycock (alaycock)
- Adriano Costa (kostadriano)
- Andrew Turgeon (maniax89)
- Ben Carp (carpben)
- Charles Pritchard (Downchuck)
- Chris Self (chrisself)
- Dallon Feldner (dallonf)
- Dan Abramov (gaearon)
- David Rice (davidlukerice)
- Dominik Palo (DominikPalo)
- Dotan Simha (dotansimha)
- Ian Schmitz (ianschmitz)
- JBallin (JBallin)
- James George (jamesgeorge007)
- James K Nelson (jamesknelson)
- Jason Laster (jasonLaster)
- Joe Haddad (Timer)
- Matthew Holloway (holloway)
- Nathan Schneider (nathanlschneider)
- Nikita Lyzhov (lyzhovnik)
- Otávio Pace (otaviopace)
- Rico Kahler (ricokahler)
- Steven Tan (StevenTan)
- Timothy (timothyis)
- Tomáš Szabo (deftomat)
- Yangshun Tay (yangshun)
- gottfired
- zhuoli99
- loveky (loveky)
Migrating from 2.1.3 to 2.1.4
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
v2.1.3
v2.1.3 is a maintenance release to fix a vulnerability in webpack-dev-server.
:memo: Documentation
- Other
- #6067 Correct an error for documentation. (@hardo)
- #6110 Replace deprecated VSCode launch.json variable. (@raiskila)
- #5631 Generalize the adding bootstrap documentation. (@jquense)
- #6084 Remove outdated docs for setting up eslint in editor. (@LukasWerfel)
- #6061 Fix control comment of CSS Grid prefixing. (@denexapp)
-
react-scripts
- #6036 Fix comment typo. (@shawtung)
:house: Internal
-
create-react-app
,react-error-overlay
- #6104 Typo fixes. (@prashant-andani)
:hammer: Underlying Tools
Committers: 8
- Denis Mukhametov (denexapp)
- Hardo (hardo)
- Janne Raiskila (raiskila)
- Jason Quense (jquense)
- Lukas Werfel (LukasWerfel)
- Prashant Andani (prashant-andani)
- Zachary Friss (Friss)
- shawtung
Migrating from 2.1.2 to 2.1.3
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
v2.1.2
v2.1.2 is a maintenance release including various bug fixes.
:rocket: New Feature
:bug: Bug Fix
-
create-react-app
-
#5905 Disable copy to clipboard in
create-react-app --info
(@heyimalex) -
#5685 Update envinfo to
5.11.1
(@tabrindle)
-
#5905 Disable copy to clipboard in
-
babel-preset-react-app
- #5783 Fix TypeScript decorator support (@ianschmitz)
-
babel-plugin-named-asset-import
-
react-app-polyfill
-
react-scripts
-
#5721 Version bump
postcss-preset-env
to latest (@BPScott) -
#5701 Fix
tsconfig.json
lib suggested value (@ianschmitz)
-
#5721 Version bump
:nail_care: Enhancement
-
react-scripts
-
#5698 Add support for
setupTests.ts
(@ianschmitz)
-
#5698 Add support for
:memo: Documentation
- Other
- #6009 Correct markdown to avoid comment. (@souzasmatheus)
- #6015 Add example command to create typed project. (@mbelsky)
- #6000 Make links to docs consistent in README. (@iansu)
- #5900 Add production build section to docs. (@ianschmitz)
- #5985 Use https for linked images to fix mixed content warnings. (@iansu)
- #5919 Docs: update localStorage mock in “Running Tests”. (@phacks)
- #5917 Add SASS_PATH instructions to Sass stylesheet docs. (@jayantbh)
-
#5823 Add default values to
file_ext
note. (@alaycock) - #5907 Update README.md with updated link about PWAs. (@wuweiweiwu)
- #5858 Some Grammar fixes. (@nikhilknoldus)
- #5883 Fix link to page about running tests. (@wsmoak)
-
#5849 React native repository updated in
README.md
. (@pavinthan) - #5806 Rename 'getting started' link to 'docs'. (@kulek1)
-
#5788 docs: Simplify installing Storybook with
npx
(@sagirk) -
#5779 docs: Change story book command to
sb init
(@andys8) - #5759 Add PR welcoming badge (@open-source-explorer)
- #5730 Suggest Encore when not building a SPA with Symfony (@dunglas)
- #5710 Updated the link to firebase hosting (@githubsaturn)
- #5704 Fixed link to manifest.json file (@m4jing)
- #5670 Fix public folder documentation link (@makovkastar)
-
eslint-config-react-app
-
#5990 Updated docs for
.eslintrc
(@ManoelLobo)
-
#5990 Updated docs for
-
babel-preset-react-app
,create-react-app
,eslint-config-react-app
,react-dev-utils
,react-scripts
-
react-scripts
-
react-app-polyfill
-
babel-preset-react-app
,eslint-config-react-app
,react-error-overlay
,react-scripts
:house: Internal
-
react-scripts
-
#5978 Add
webp
support for TypeScript. (@dugagjin) - #5959 Suggest a different default for speed reasons. (@Timer)
- #5839 Run prettier on HTML files. (@sibiraj-s)
- #5722 Merge webpack configuration. (@Timer)
- #5694 Add permissive TS lib defaults. (@Timer)
-
#5978 Add
- Other
-
#5988 Added extension to
.eslintrc
(@ManoelLobo) - #5546 Add the latest stable node version. (@noelyoo)
-
#5988 Added extension to
-
react-dev-utils
- #5927 Correct some comments. (@mjackson)
- #5879 fix: make typescriptformatter support 0.5 of fork checker. (@SimenB)
-
react-error-overlay
-
babel-preset-react-app
-
create-react-app
- #4605 ignore intellij module files when generating an app. (@denofevil)
Committers: 36
- \<Explorer /> (open-source-explorer)
- Adam Laycock (alaycock)
- Adam Wanninger (ajwann)
- Alex Guerra (heyimalex)
- Andy (andys8)
- Ben Scott (BPScott)
- Dennis Ushakov (denofevil)
- Dugagjin Lashi (dugagjin)
- Gregory Shilin (gshilin)
- Ian Schmitz (ianschmitz)
- Ian Sutherland (iansu)
- Jayant Bhawal (jayantbh)
- Jing Ma (m4jing)
- Joe Haddad (Timer)
- Kasra Bigdeli (githubsaturn)
- Kévin Dunglas (dunglas)
- Manoel (ManoelLobo)
- Matheus Souza (souzasmatheus)
- Max Belsky (mbelsky)
- Michael Jackson (mjackson)
- Nicolas Goutay (phacks)
- Nikhil (nikhilknoldus)
- Nima Shahri (NShahri)
- Noel Yoo (noelyoo)
- Oleksandr Melnykov (makovkastar)
- Pavinthan (pavinthan)
- Rasmus Eneman (Pajn)
- Sagir Khan (sagirk)
- Sibiraj (sibiraj-s)
- Simen Bekkhus (SimenB)
- Stephen Algeo (sjalgeo)
- Trevor Brindle (tabrindle)
- Wei-Wei Wu (wuweiweiwu)
- Wendy Smoak (wsmoak)
- kulek1
- swyx (sw-yx)
Migrating from 2.1.1 to 2.1.2
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
v2.1.1
Happy Halloween 🎃 👻! This spooky release brings a treat: decorator support in TypeScript files!
:bug: Bug Fix
-
babel-preset-react-app
-
react-scripts
- #5621 fix 'Duplicate string index signature' in ProcessEnv. (@xiaoxiangmoe)
:nail_care: Enhancement
:memo: Documentation
- #5658 Update making-a-progressive-web-app.md. (@jakeboone02)
- #5635 Update minimum node version to 8.10 in README. (@iansu)
- #5629 Add link to cra-ts migration guide. (@Vinnl)
:house: Internal
-
react-error-overlay
-
#4709 Expose
reportRuntimeError
. (@hipstersmoothie)
-
#4709 Expose
-
babel-plugin-named-asset-import
-
react-scripts
- #5651 Make serviceWorker config argument optional in typescript. (@eddedd88)
Committers: 8
- Andrew Lisowski (hipstersmoothie)
- Eduardo Duran (eddedd88)
- Ian Sutherland (iansu)
- Jake Boone (jakeboone02)
- Joe Haddad (Timer)
- Nima Shahri (NShahri)
- Vincent (Vinnl)
- ZHAO Jinxiang (xiaoxiangmoe)
Migrating from 2.1.0 to 2.1.1
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
v2.1.0
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
-
babel-preset-react-app
,react-scripts
- #4837 TypeScript support using Babel 7 (@brunolemos)
:bug: Bug Fix
-
react-scripts
- #5611 Remove react-scripts type reference on eject. (@Timer)
- #5614 Ignore json files from TypeScript type checking. (@brunolemos)
- #5609 Remove unsupported options. (@Timer)
- #5608 Ignore test files from reported type errors. (@Timer)
- #5589 Update react-app.d.ts. (@brunolemos)
- #5557 Add typings for process.env. (@brunolemos)
- #5532 Use TypeScript parser to read tsconfig.json. (@brunolemos)
- #5527 Update Workbox dependency. (@jeffposnick)
-
react-dev-utils
,react-scripts
- #5549 Automatically setup TypeScript when detected. (@Timer)
- #5537 Respect tsconfig.json extends when validating config. (@ianschmitz)
:nail_care: Enhancement
-
create-react-app
,react-scripts
-
react-scripts
-
react-dev-utils
,react-scripts
:memo: Documentation
- Other
- #5552 Fixing Internal Links. (@ehfeng)
- #5551 Add Algolia search bar to Docusaurus. (@amyrlam)
- #5533 Simplified TypeScript steps. (@brunolemos)
- #5492 Add "edit" feature to Docusaurus pages. (@amyrlam)
- #5499 Fix title on Safari. (@yuyokk)
- #5494 Fix typo. (@noelyoo)
- #5493 Fixed typo in getting-started. (@jessepeterman)
- #5344 Add some headings to the getting started section. (@selbekk)
- #5251 Add SoMe links to documentation. (@selbekk)
-
react-scripts
:house: Internal
-
react-scripts
- #5607 Turn on certain TypeScript options. (@Timer)
- #5559 Change import syntax from typescript declaration. (@brunolemos)
- #5469 Avoid pushing .pnp folder to git. (@NShahri)
- #5527 Update Workbox dependency. (@jeffposnick)
-
eslint-config-react-app
- #5586 Fixing the code splitting links in the ESLint output. (@jheijmans)
Committers: 15
- Amy Lam (amyrlam)
- Bruno Lemos (brunolemos)
- Eric Feng (ehfeng)
- Ian Schmitz (ianschmitz)
- Ian Sutherland (iansu)
- Iurii Kucherov (yuyokk)
- Jeffrey Posnick (jeffposnick)
- Jeroen Heijmans (jheijmans)
- Jesse Peterman (jessepeterman)
- Joe Haddad (Timer)
- Kit Thompson (thompk2)
- Kristofer Selbekk (selbekk)
- Nima Shahri (NShahri)
- Noel Yoo (noelyoo)
- Ran Yitzhaki (ranyitz)
Migrating from 2.0.5 to 2.1.0
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
v2.0.5
:bug: Bug Fix
-
react-dev-utils
- #5431 Fix click-to-open on Windows. (@gaearon)
- #5335 Fix file size report after build. (@OskarPersson)
-
create-react-app
-
react-scripts
:nail_care: Enhancement
-
babel-preset-react-app
-
react-scripts
- #5354 Add environment variable to optionaly disable inlining of chunks. (@0xdeafcafe)
-
#5330 Update
eslint-plugin-jsx-a11y
version. (@AlmeroSteyn)
:memo: Documentation
-
react-scripts
-
#5321 Added note on update to
.flowconfig
for .scss imports. (@rlueder) - #5394 Correct instructions for HTTPS and PowerShell. (@gavinbarron)
- #5410 Updates to clarify the "waiting" SW behavior. (@jeffposnick)
- #5302 Update README.md. (@simonCordovaByte9)
- #5334 Update README due to deprecation of react-testing-library's toBeInTheDOM. (@rrebase)
- #5326 README link fixes. (@davidgilbertson)
- #5327 Updated the URL in index.html. (@behzod)
- #5296 Adding documentation about git init. (@ryancogswell)
- #5290 Add react-testing-library documentation/examples (#4679). (@gnapse)
- #5286 Fix broken links to src/serviceWorker.js. (@adambowles)
-
#5321 Added note on update to
-
Other
-
eslint-config-react-app
- #5416 Fix eslint config docs. (@ludovicofischer)
:house: Internal
-
Other
-
create-react-app
-
react-scripts
- #5317 Remove unused require for getCacheIdentifier after ejecting. (@benbrandt)
Committers: 23
- Adam Bowles (adambowles)
- Alex Forbes-Reed (0xdeafcafe)
- Almero Steyn (AlmeroSteyn)
- Behzod Saidov (behzod)
- Ben Brandt (benbrandt)
- Dan Abramov (gaearon)
- David Gilbertson (davidgilbertson)
- Ernesto García (gnapse)
- Gavin Barron (gavinbarron)
- Jeffrey Posnick (jeffposnick)
- Joe Haddad (Timer)
- Jon Clark (jonscottclark)
- Kristofer Selbekk (selbekk)
- Ludovico Fischer (ludovicofischer)
- Mikhail Vasin (mvasin)
- Oskar Persson (OskarPersson)
- Peter Bengtsson (peterbe)
- Rafael Lüder (rlueder)
- Ragnar Rebase (rrebase)
- Ryan Cogswell (ryancogswell)
- Vikram Rangaraj (vikr01)
- Wenchen Li (neo)
- simonCordovaByte9
Migrating from 2.0.4 to 2.0.5
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
v2.0.4
:bug: Bug Fix
-
react-scripts
-
babel-preset-react-app
:nail_care: Enhancement
-
create-react-app
-
react-scripts
:memo: Documentation
- Other
- #5228 removed create-react-app-parcel link (@lockround)
- #5254 Update README links for CSS modules and SASS (@yuyokk)
- #5249 Set the color palette to something a bit more React-y (@selbekk)
- #5244 Update favicon and OpenGraph images (@selbekk)
- #5242 5238 Removing sample pages (@selbekk)
- #5243 Set the project name and owner correctly (@selbekk)
- #5239 5238 removing blog from Docusaurus (@selbekk)
- #5227 Initial setup of Docusaurus (@amyrlam)
-
react-scripts
:house: Internal
Committers: 11
- Amy Lam (@amyrlam)
- Crux (@crux153)
- Dan Abramov (@gaearon)
- Ian Sutherland (@iansu)
- Iurii Kucherov (@yuyokk)
- Joe Haddad (@Timer)
- Kohei Hasegawa (@banyan)
- Kristofer Selbekk (@selbekk)
- Maël Nison (@arcanis)
- Shubham Tiwari (@lockround)
- Zacharias Knudsen (@zachasme)
Migrating from 2.0.3 to 2.0.4
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
v2.0.3
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
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, [email protected]
contains 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 .default
property
Webpack 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 dynamic import()
We previously allowed code splitting with a webpack-specific directive, require.ensure()
. It is now disabled in favor of import()
. To switch to import()
, 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 jsdom
Look at the test
entry in the scripts
section of your package.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=jsdom |
react-scripts test |
react-scripts test |
react-scripts test --env=node |
Object proxy
configuration is superseded by src/setupProxy.js
To check if action is required, look for the proxy
key in package.json
and follow this table:
- I couldn't find a
proxy
key inpackage.json
- No action is required!
- The value of
proxy
is a string (e.g.http://localhost:5000
)- No action is required!
- The value of
proxy
is an object- Follow the migration instructions below.
It's worth highlighting: if your proxy
field is a string
, 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 proxy
is 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-middleware
using npm or Yarn:
npm install http-proxy-middleware
or
yarn add http-proxy-middleware
Next, create src/setupProxy.js
and place the following contents in it:
const proxy = require('http-proxy-middleware');
module.exports = function(app) {
// ...
};
Now, migrate each entry in your proxy
object one by one, e.g.:
"proxy": {
"/api": {
"target": "http://localhost:5000/"
},
"/*.svg": {
"target": "http://localhost:5000/"
}
}
Place entries into src/setupProxy.js
like 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.
.mjs
file extension support is removed
Change the extension of any files in your project using .mjs
to 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.
PropTypes
definitions are now removed in production
Normally, 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 doe
Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!
".
:no_bell: Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Renovate Bot. View repository job log here.
Codecov Report
Merging #71 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #71 +/- ##
=======================================
Coverage 93.75% 93.75%
=======================================
Files 1 1
Lines 16 16
=======================================
Hits 15 15
Misses 1 1
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f06afc5...2d771b5. Read the comment docs.