Create-react-app: What does updating react-scripts actually do for an existing project?

Created on 3 Oct 2017  路  3Comments  路  Source: facebook/create-react-app

Sorry if this is a daft question, but reading the docs on how to update an existing application I'm left wondering what it actually does?

If I bump the react-scripts version and run npm install, will I get all the bug fixes and improvements? Some quick examples are the use of Webpack 2 and React 16.

Do they get updated as well? Or for that matter all the other libs that are in dependencies and devDependencies with their own version numbers?

I can't see how since npm install runs through those lists and the only thing changed is react-scripts, but I might be the daft one here? :)

Do I need to run some additional command after react-scripts has been updated that gets Webpack 2, updates relevant dependency versions in package.json?

question

Most helpful comment

The one dependency we do not control is react (& react-dom), you install and choose the version of that you wish.

And to answer your original question more sufficiently, updating react-scripts updates webpack, babel, eslint, etc.

All 3 comments

Updating react-scripts gets you many things, which is our value proposition to not eject!

All of the underlying tooling is automatically updated and configured for you, along with bug fixes & speed improvements.

For example, version 1.0.11 upgraded from webpack 2 to webpack 3 -- we can do these changes in a patch release because everything is hidden away. This brought speed improvements.

Other than that, we're making changes rapidly to our react-error-overlay, and you need to not eject to keep gaining those enhancements -- we release breaking changes often so if you are ejected it's quite difficult to track and update your configurations post-eject.

We also vet packages and run them against a test suite, making sure we ship stable development dependencies so you don't have to think about it.

We enable the latest rules, syntax features, and other niceties in a way completely hidden from you 馃槃.


tl;dr you can develop, never think about build tooling, and have the latest (properly configured) linting, building, and syntax / language support

The one dependency we do not control is react (& react-dom), you install and choose the version of that you wish.

And to answer your original question more sufficiently, updating react-scripts updates webpack, babel, eslint, etc.

Okay! I'm glad that you added the last comment, "we do not control react". I think that was confusing me. :)

Things are more clear now and I see I made some daft assumptions. I was the daft one. :)

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gaearon picture gaearon  路  152Comments

andreypopp picture andreypopp  路  96Comments

ericdfields picture ericdfields  路  78Comments

xiaoxiangmoe picture xiaoxiangmoe  路  89Comments

jantimon picture jantimon  路  154Comments