facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.73k stars 26.85k forks source link

Roadmap for react-scripts@2.0 #3815

Closed gaearon closed 6 years ago

gaearon commented 6 years ago

We have just released react-scripts@1.1.0 and, aside from critical vulnerabilities or similar issues, we intend this to be the last 1.x release. Our work on the 2.x release of react-scripts is in the next branch, and we switched it to be the default on GitHub. This way people who automatically sync their forks with master will only get non-breaking updates until the next branch is truly ready.

Already Merged

So what’s gonna be in 2.x? Here’s a few big things that are already in the next branch:

Very Likely to Land in 2.0 (But Might Need Your Help)

There are many more things we want to do but it will require help from the community. For now, they’re optimistically tagged with a 2.0.0 milestone (issues, PRs) but it’s likely we’ll only get to some of them. If you feel strongly about any of them, look at these issues, offer help if you’d like to increase their changes of getting landed, provide feedback to people who submit PRs, help them with planning and design, etc. What gets merged in the end really depends on your participation.

I feel strongly that these are blockers that should get into 2.0:

They’re relatively fleshed out although Sass will need somebody to make a PR once other pieces are in place. We should also figure out a way to make Sass work with CSS Modules. We’ll also need a PR for making service workers opt-in.

Issues and PRs That Need More Work and Discussion

These look less fleshed out to me and might need more discussion, design, and implementation work:

Please Participate!

So, what do you think? Does this list look exciting to you? If you want to help, please participate. I don’t expect that I’ll have a ton of time to work on all of this personally, but we have a really great community and I hope you can help us flesh out these proposals. If you also want to help maintaining the project (and have some experience maintaining open source projects; not necessarily large ones) please also let us know.

☢️ How Can I Test This Now? ☢️

We're happy you'd like to test the next version of react-scripts! Before getting into the details, we'd like to make you aware of a few things:

  1. Features may be broken or not work as expected
  2. There will be more breaking changes introduced before the final release ⚠️
  3. Documentation for new features is still sparse, so look through the pull requests for how they're expected to work

You can install the latest alpha version of react-scripts using one of the following commands:

$ # Create a new application
$ npx create-react-app@next --scripts-version=2.0.0-next.2150693d app-name
$ # Upgrade an existing application
$ yarn upgrade react-scripts@2.0.0-next.2150693d

Known Issues in 2.x Alphas

None, currently.

Please report any other bugs you encounter or behavior you believe to be incorrect. Have fun!

Timer commented 6 years ago

Please open a separate ticket. Thanks!

alexeyraspopov commented 6 years ago

Opened https://github.com/facebook/create-react-app/issues/4206

kopax commented 6 years ago

I did :

$ yarn upgrade react-scripts@2.0.0-next.b2fd8db8

But when we I try to start the app I have :

dka@dev-01:[~/tmp/my-app]: npm start

> my-app@0.1.0 start /home/dka/tmp/my-app
> react-scripts start

? We're unable to detect target browsers.

Would you like to add the defaults to your package.json? (Y/n) 

Can we have this json injection non interactive?

Timer commented 6 years ago

This will only ever happen for apps which are being migrated, so I'm not sure I see value in adding a non-interactive path. You could always use yes or probably some echo "\n" that's piped to npm start the first time if that's necessary.

lifeiscontent commented 6 years ago

Honestly, idk why configuration is a bad thing, I'd rather have CRA have presets for all the things. like next.js does babel/next, there should be a babel/create-react-app and for postcss, eslint, etc.

That way, if I want to add TypeScript to my babel config, it's literally just me adding 1 change to my config or add postcss I can.

nfantone commented 6 years ago

This ☝️. "Zero configuration" is one of those things that reads good, but rarely manage to pull through. IMHO, there's absolutely no excuse why users shouldn't be allowed to add their own .babelrc, .eslintrc, etc. files and override defaults - exactly like what many other tools out there do. At this point, with the level of maturity most tools being used by CRA have, I tend to think it's more related to personal preferences of maintainers rather than having an actual reason behind the decision.

gaearon commented 6 years ago

Can we please keep this thread focused on the 2.0 release? This was not intended to be an issue for philosophical discussions because this makes it very noisy and hard to follow the development. Thanks.

vsanthanam commented 6 years ago

I noticed people that SASS opt-in support was mentioned as something people want. Am I the only one who would like to see LESS opt-in support?

andriijas commented 6 years ago

Nah my personal opinion is that both could be added easily since one of them are added. Similar config that can be reused with functions

kopax commented 6 years ago

@vsanthanam I understood LESS when they created it (no need to compile to use less), but since it's now build with webpack, what are the differences between using LESS over SASS ?

wrobel commented 6 years ago

Does someone have a hint on how I might be able to move my create-react-app dependency to the current HEAD of next as long as there is no new alpha release? I realized today that our current builds break compatibility with IE11 due to #4234

Now I'd be happy if I could advance to a version after that fix in order to fix our builds before a new alpha gets released. Is that easily possible? If so how?

Thanks!

reyronald commented 6 years ago

@wrobel It's possible to point a npm dependency to a Git repo and a specific commit, see details here: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies. But the versioned code in the repo itself is not prepared to be consumed as a npm package, you'll probably gonna have to fork it and push the prepared package.

Although I don't think we should be discussing topics that are not specifically related to the 2.0 release as @gaearon pointed out in https://github.com/facebook/create-react-app/issues/3815#issuecomment-378763965. If you still having trouble with that maybe you should open a different issue or ask in Stack Overflow / Twitter ? Or even better, go to Reactiflux's Discord channel: https://www.reactiflux.com/

gbarkhatov commented 6 years ago

@wrobel oh well, it was #4234! I moved one of my projects to styled-components and stable cra from css modules and alpha 2, so it can be supported in IE11 ☹️

Timer commented 6 years ago

Hi, we'll be releasing a new alpha soon, for the time being, you can use an old alpha. 😄 I want to get Sass into the next alpha, and it's nearly ready!

devgunyogesh commented 6 years ago

@Timer : when is new alpha coming?

Update 22 Apr 18: new alpha there including Sass 😀

leggomuhgreggo commented 6 years ago

Did #4012 get de-scoped from this? I see a reference from this issue on that PR, but don't actually see it in the thread.

Timer commented 6 years ago

@leggomuhgreggo no, but I've added it to the milestone. Thanks for the reminder.

Timer commented 6 years ago

Hi everyone!

react-scripts@2.0.0-next.66cc7a90 was just released 🎉.

📦 Here's what's inside:

  1. Opt-in Sass support, just install node-sass and require .sass files!
  2. Relax ESLint rule for args
  3. Check for improper prop type usage
  4. Fix old browser compatibility when targeted
  5. Enable loose mode for class properties, restoring functionality for MobX (because the library is not spec compliant) and reducing bundle size
  6. Tweaked CSS Module localIdentName

Let us know if you run into any issues. 😄

Tasemu commented 6 years ago

when I have a component and import as the following, my classnames are empty strings. Any idea why?

import styles from "./Paragraph.module.scss"

detrohutt commented 6 years ago

@Tasemu You should probably open a separate issue for questions/bug reports. This thread is meant for things directly related to the roadmap/release cycle (expected dates, scope, announcements, etc).

A lot of people are subscribed to this thread and receiving emails each time someone posts here, and questions like yours can easily lead to a bunch of back and forth (and hence notifications). As Dan mentioned recently this makes it hard for others to follow development.

You could reference this thread in your issue when you create it though to show that it's related and help people with similar issues notice it.

fsdiogo commented 6 years ago

Hey guys, I couldn't find an ETA for CRA with react-scripts@2.0, is there a planned released date?

gaearon commented 6 years ago

No, it will be released when it's ready. You can help move that forward by contributing. :-)

kopax commented 6 years ago

@gaeron is this the complete list of missing features?

thisconnect commented 6 years ago

I am testing react-scripts@2.0.0-next.66cc7a90 (not sure if that is the most recent one)

But I am getting the same message as https://github.com/facebook/create-react-app/issues/3815#issuecomment-377420672 and am not able to confirm with Y :( any idea what I am doing wrong or is this a known issue?

EDIT: confirming ? We're unable to detect target browsers. withY only hanged when running npm start. It seems to work with npm run build, git diff now shows browserslist added in package.json

jefflau commented 6 years ago

I left a message over here: https://github.com/facebook/create-react-app/pull/4085 on a merged pull request.

I've been testing react-scripts@next so I can use babel-plugin-macros with my react-apollo app, however this fix does not seem to be in 2.0. Is it possible to have this fix so we can use graphql in the alpha version of react-scripts?

gaearon commented 6 years ago

Please file a new issue? It’s hard to track conversation in merged PRs.

AndrewCraswell commented 6 years ago

Sorry if this is out of place, but are there any instructions for testing the latest code? I'd like to experiment with merge #4077 but not quite sure how it's meant to be tested without a release...

miraage commented 6 years ago

@AndrewCraswell wait till maintainers announce a new tag. You can track changes for next tag here.

geminiyellow commented 6 years ago

i notice that webpack 4 branch was merged , but when i use react-scripts@2.0.0-next.66cc7a90 create a new application and eject it, webpack 3 still here. that means #4077 is for the tool cra not the application made by cra, right ?

strothj commented 6 years ago

@geminiyellow No release was cut yet with merged in Webpack 4. It's merged in but not published yet.

geminiyellow commented 6 years ago

@strothj thank you. wating...

detrohutt commented 6 years ago

@gaearon Would it be feasible to create a separate issue for release announcements only and lock comments to avoid notification noise? That’s all I’m interested in knowing about and could then unsubscribe from this issue.

pelotom commented 6 years ago

@detrohutt I recommend https://tellmewhenitcloses.com

detrohutt commented 6 years ago

@pelotom thank you, but I was referring to the beta releases. I’m sure that will be adequate for some people though, so thanks for sharing.

bugzpodder commented 6 years ago

Hi int64go, I believe there will be another release to test webpack 4 integration.

nickserv commented 6 years ago

Blockers column: https://github.com/facebook/create-react-app/projects/3

gaearon commented 6 years ago

I’ve locked the conversation to only include maintainers so that there is less notification noise for everybody else. I appreciate everyone’s impatience with this, but let’s respect people’s inboxes. :-)

If you want to help out with maintenance please reach out in Twitter DMs. We still could use more help. (Especially in terms of driving project towards the 2.x release: not just feature development, but looking at the overall strategy, finding blockers and resolutions, planning and scoping features.)

There’s a lot of work that’s already been done, but to me 2.0 still feels a bit out of reach, and I think we might want to scope it back a little bit and omit some things we originally planned. I feel like we should time 2.0 final around the same time Babel 7 goes stable, and if something doesn’t make the cut, it should go into 3.x instead.

To all maintainers— please feel free to continue announcements and crucial 2.x related discussion on this thread. I only locked to avoid repetitive comments like “when does this come out”. It will come out when it’s ready, and if you want to help, you can reach out to me.

Timer commented 6 years ago

Hello everyone! Sorry that it has been a while since our last alpha.

We just released react-scripts@2.0.0-next.3e165448

📦 Here's what's inside:

  1. Webpack 4 (including scope hoisting)
  2. Quicker recompiles while developing (prevented workers from exiting)
  3. Updated browser defaults (when creating a new project)
  4. Upgraded Babel & Jest
  5. Fixed CSS Modules for Production builds
  6. Fixed Sass Modules in Jest tests
  7. mjs work-around (only use as fallback over js)

Let us know if you run into any issues. 😄

note: to use the new browser defaults, remove the browserslist key from package.json and then run npm start. You will be prompted to set the defaults again.

gaearon commented 6 years ago

I just released react-scripts@2.0.0-next.a671462c with a security vulnerability fix affecting Windows users. Please upgrade. See https://github.com/facebook/create-react-app/pull/4866 for details.

Timer commented 6 years ago

The (hopefully) final beta is out. Please see https://github.com/facebook/create-react-app/issues/5103 for more details!

gaearon commented 6 years ago

It shipped.

https://reactjs.org/blog/2018/10/01/create-react-app-v2.html