Set up a modern web app by running one command.
MIT License
Bot releases are hidden (Show)
Published by iansu over 5 years ago
v2.1.7 is a maintenance release that temporarily reverts the TypeScript speed improvements (#6406) to fix a dependency issue in react-dev-utils
.
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by iansu over 5 years ago
v2.1.6 is a maintenance release that brings a few new improvements, most notably:
react-dev-utils
react-scripts
react-dev-utils
, react-scripts
create-react-app
yarn.lock.cached
if using the default Yarn registry. (@hangryCat)react-scripts
babel-preset-react-app
babel-preset-react-app
, confusing-browser-globals
, react-app-polyfill
create-react-app
react-dev-utils
source-map-explorer
docs to analyze all chunks. (@Kamahl19)react-dev-utils
, react-scripts
react-scripts
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by ianschmitz over 5 years ago
v2.1.5 is a maintenance release that reverts the TypeScript speed improvements (#5903) to fix a dependency issue in react-dev-utils
.
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by ianschmitz over 5 years ago
v2.1.4 is a maintenance release that brings a number of awesome improvements. A few notable ones include:
react-scripts
react-scripts
react-dev-utils
, react-scripts
--no-watch
. (@ricokahler)serve
port flag and add example. (@lyzhovnik)react-scripts
react-scripts
module
to ignored node modules list. (@dotansimha)react-dev-utils
, react-scripts
babel-plugin-named-asset-import
, react-scripts
react-dev-utils
babel-preset-react-app
, react-app-polyfill
, react-dev-utils
, react-error-overlay
, react-scripts
babel-preset-react-app
, react-app-polyfill
, react-dev-utils
, react-scripts
babel-preset-react-app
eslint-config-react-app
, react-scripts
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by ianschmitz almost 6 years ago
v2.1.3 is a maintenance release to fix a vulnerability in webpack-dev-server.
react-scripts
create-react-app
, react-error-overlay
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by Timer almost 6 years ago
v2.1.2 is a maintenance release including various bug fixes.
create-react-app
create-react-app --info
(@heyimalex)5.11.1
(@tabrindle)babel-preset-react-app
babel-plugin-named-asset-import
react-app-polyfill
react-scripts
postcss-preset-env
to latest (@BPScott)tsconfig.json
lib suggested value (@ianschmitz)react-scripts
setupTests.ts
(@ianschmitz)file_ext
note. (@alaycock)README.md
. (@pavinthan)npx
(@sagirk)sb init
(@andys8)eslint-config-react-app
.eslintrc
(@ManoelLobo)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
react-scripts
.eslintrc
(@ManoelLobo)react-dev-utils
react-error-overlay
babel-preset-react-app
create-react-app
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by Timer almost 6 years ago
Happy Halloween π π»! This spooky release brings a treat: decorator support in TypeScript files!
babel-preset-react-app
react-scripts
react-error-overlay
reportRuntimeError
. (@hipstersmoothie)babel-plugin-named-asset-import
react-scripts
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by Timer almost 6 years ago
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
create-react-app
, react-scripts
babel-preset-react-app
, react-scripts
react-scripts
react-dev-utils
, react-scripts
create-react-app
, react-scripts
react-scripts
react-dev-utils
, react-scripts
react-scripts
react-scripts
eslint-config-react-app
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon about 6 years ago
react-dev-utils
create-react-app
react-scripts
babel-preset-react-app
react-scripts
eslint-plugin-jsx-a11y
version. (@AlmeroSteyn)react-scripts
.flowconfig
for .scss imports. (@rlueder)Other
eslint-config-react-app
Other
create-react-app
react-scripts
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by Timer about 6 years ago
react-scripts
babel-preset-react-app
create-react-app
react-scripts
react-scripts
Published by Timer about 6 years ago
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.
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.
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.
Please upgrade to Node 8 (LTS) or later.
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.
import()
of a CommonJS module now has a .default
propertyWebpack 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]) => {
// ...
});
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 |
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:
proxy
key in package.json
proxy
is a string (e.g. http://localhost:5000
)
proxy
is an object
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 removedChange 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 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.
This was a large release, and we might have missed something.
Please file an issue and we will try to help.
If you used 2.x alphas, please follow these instructions.
For a readable summary of the changes, check out our blog post.
For the detailed changelog, please see CHANGELOG.md.
Published by gaearon about 6 years ago
react-scripts
webpack-dev-server
dependencyreact-dev-utils
CVE-2018-6342
) in the development server (@acdlite)
react-dev-utils
: [email protected]
, [email protected]
, [email protected]
, [email protected]
, [email protected]
, and [email protected]
sockjs-client
dependencyInside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by Timer over 6 years ago
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon over 6 years ago
react-scripts
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon over 6 years ago
react-scripts
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon over 6 years ago
react-scripts
{json,css}
files in prettier command. (@reyronald)Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon almost 7 years ago
react-scripts
react-error-overlay
create-react-app
--info
flag to help gather bug reports. (@tabrindle)--use-npm
flag to bypass Yarn even on systems that have it. (@tabrindle)--scripts-version
to include .tar.gz
format. (@SaschaDens)"file:<path>"
--scripts-version
values. (@GreenGremlin)babel-preset-react-app
, react-scripts
react-dev-utils
GET
. (@doshisid)lsof
. (@rmccue)++
in the name. (@Norris1z)create-react-app
.npmrc
. (@mdogadailo)react-scripts
react-scripts
create-react-app
react-dev-utils
code-insiders
to the editor list. (@shrynx)react-dev-utils
, react-error-overlay
react-dev-utils
, react-scripts
eslint-config-react-app
User Guide
Other
eslint-config-react-app
Other
cra.sh
development task to javascript. (@ianschmitz)dismissRuntimeErrors
function. (@skidding)printHostingInstructions
a bit. (@GreenGremlin)FileSizeReporter
for multi build Webpack setups. (@iiska)react-dev-utils
. (@xjlim)Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon almost 7 years ago
react-scripts
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon almost 7 years ago
react-scripts
react-dev-utils
Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]
Published by gaearon almost 7 years ago
react-scripts
react-dev-utils
, react-scripts
react-scripts
babel-preset-react-app
, react-dev-utils
, react-error-overlay
, react-scripts
react-dev-utils
, react-error-overlay
create-react-app
User Guide
npm-run-all
to build Sass and JS. (@shime)README
Other
react-error-overlay
react-error-overlay
in production. (@Timer)react-error-overlay
has no dependencies now (it's bundled). (@Timer)react-scripts
registerServiceWorker.js
. (@dunglas)output.path
from dev webpack config. (@nikolas)reason-react
support. (@lpalmes)style-loader
and disable inclusion of its HMR code in builds. (@insin)url-loader
to 0.6.2 for mime ReDoS vulnerability. (@d3viant0ne)<!doctype html>
-> <!DOCTYPE html>
. (@Hurtak)Inside any created project that has not been ejected, run:
npm install --save --save-exact [email protected]
or
yarn add --exact [email protected]