question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Completion roadmap for react-scripts@2.0

See original GitHub issue

Hey everyone! We know progress on react-scripts@2.0 has been stagnating for a while.

We put together a lofty set of goals when we first started v2. The scope of these changes have proven themselves to be too large to effectively polish everything and create a stable build.

To remediate this, we’re going to reduce the scope of v2, polish completed features, and release v2 as stable within the next two (2) weeks.

Action Plan

Our proposed plan of action is as follows (in no particular order):

  1. ✅ Fix vendor chunking (https://github.com/facebook/create-react-app/issues/4977, https://github.com/facebook/create-react-app/issues/4769, https://github.com/facebook/create-react-app/issues/4633, https://github.com/facebook/create-react-app/issues/4632)

    • Vendor chunking exhibits undesirable behavior when used in combination with code splitting. The application dependencies used by every application chunk end up in a single vendor bundle, effectively nullifying the value of code splitting.
    • We would like to create a vendor chunk per application chunk. If this behavior cannot be achieved, we will revert vendoring and place dependencies in the application chunks.
    • As an alternative to the former, we may only enable the vendor chunk when no code splitting is used in your application (if possible).
  2. ✅ Switch to Terser (https://github.com/facebook/create-react-app/issues/4948, https://github.com/facebook/create-react-app/issues/4902, https://github.com/facebook/create-react-app/issues/4711, https://github.com/facebook/create-react-app/issues/4692, https://github.com/facebook/create-react-app/issues/4683, https://github.com/facebook/create-react-app/issues/4665, https://github.com/facebook/create-react-app/issues/4329, https://github.com/facebook/create-react-app/issues/4116, https://github.com/facebook/create-react-app/issues/4100)

    • Uglify-ES has been the source of a lot of problems, and is no longer maintained. We should switch to Terser (the more maintained fork of Uglify-ES) to fix obscure bugs resulting from production builds.
  3. ✅ Revert monoreport support (https://github.com/facebook/create-react-app/pull/3741, https://github.com/facebook/create-react-app/pull/3997, https://github.com/facebook/create-react-app/pull/4001) because there’s too many issues (https://github.com/facebook/create-react-app/issues/4569, https://github.com/facebook/create-react-app/issues/4410, https://github.com/facebook/create-react-app/issues/4249, https://github.com/facebook/create-react-app/issues/4092, https://github.com/facebook/create-react-app/pull/4570, https://github.com/facebook/create-react-app/issues/3031, https://github.com/facebook/create-react-app/pull/3967)

    • We would’ve loved to figure out all of the ergonomics around monorepo support, but it turns out it’s just too difficult.
    • We’re going to revert monorepo support in favor of consuming library packages via nwb and provide excellent documentation on how to do so. This is arguably the best way.
  4. ✅ Fix edge-cases for compiling node_modules and polish Babel 7 upgrade

    • Compiling node_modules has surfaced some issues, particularly around async/await and regenerator.
    • We also need to make sure all of our Babel configuration tricks are valid for v7.
  5. ✅ Remove mjs support

    • The ecosystem is not ready for mjs support and we’re going to remove support to fix complex edge cases with resolving modules. There are alternative resolve orders based on source file and supported features which are concepts Jest does not have support for yet.
    • This will be added back in the future.
  6. ✅ Drop advanced proxy configuration and replace it with express middleware

    • Allowing users to configure their proxy in package json has been a pain-point and source of configuration, going against our values of convention.
    • We will remove the ability to configure the proxy and replace it with exposing the express app instance. You can attach any middleware or routes to this express app that you’d like.
    • A recipe for proxying requests will be provided in the documentation.
  7. ✅ Remove support for targeting newer browsers

    • We added support for targeting specific sets of browsers and there has been multiple issues that cropped up about this. We are going to remove the ability to target browsers and compile everything down to ES5 – this is in line with v1 behavior.
    • The difference now is that we compile node_modules, so you can consume any package using newer syntax without worry.
    • In a follow up release, (potentially v2.1) we will explore adding a “modern”/evergreen browser mode which outputs modern, (nearly) uncompiled ESnext. This should give users the best of both worlds, and is in line with what we see in the community. A proposal going into more detail will be put together after the release of v2.

How can I help?

Please let us know your thoughts and if we missed anything. We’ll be more than happy to explain our rationale around these decisions if there’s any further questions.

If there’s anything you (and the community) feel strongly about but is not found on this list, please make an effort to send a PR! We’ll be more than happy to accept contributions.

Cheers, everyone!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:193
  • Comments:35 (19 by maintainers)

github_iconTop GitHub Comments

58reactions
Timercommented, Sep 19, 2018

To summarize the existing changes and the above proposed changes:

v2 Features

  1. Babel 7
  2. Jest 23
  3. webpack 4
  4. Babel Macros
  5. Compiling node_modules to support packages using newer language features
  6. Parallelization of webpack builds to speed up compilation
  7. Opt-in support for CSS Modules
  8. Opt-in support for Sass
  9. Targeted CSS support via browserslist package.json key
  10. SVG as React components
  11. Remove propTypes definitions in the production build
  12. Service workers are now opt-in
  13. Long-term webpack caching via consistent hashing and vendor bundles

Features removed from v2

  1. Monorepo support (supplanted via documentation)
  2. Advanced proxy configuration in package.json (moving to src/setupProxy.js instead)
  3. Specifying newer target browsers: all code will be compiled down to ES5 (in line with v1 behavior)
  4. mjs extension support
14reactions
bjankordcommented, Sep 18, 2018

@Timer @gaearon oh_you_zoolander You’re awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Versions - React
React Versions​​ A complete release history for React is available on GitHub. Changelogs for recent releases can also be found below. The current...
Read more >
The Complete React Roadmap - DEV Community ‍ ‍
This article aims to put forth a complete roadmap to learn React so that you have a clear path moving forward.
Read more >
A Web Developer's Roadmap to Learning React Native in 2020
If you are an experienced web developer or you have fewer years of programming experience then this React Native roadmap 2020 is for...
Read more >
The 2022 React JS Developer RoadMap [Updated] - Medium
js in 2022, and in this article, I am going to share the complete React Developer RoadMap. The React JS or simply React...
Read more >
A Beginner's Guide to WordPress React Development Projects
By default, you can make a GET request to use WP REST API on the front-end of your site. For example, you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found