-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't replace CRA #13598
Comments
This can be solved by the community maintaining the CRA package and offering a prompt style choice as with nextjs. While just a draft a prompt like this offers more advanced configurations such as
|
that will solve part of the problem. CRA creates lots of convince. I don't have to define proxy middleware in my webpack config file or Vite config to proxy api requests. I just need to add, having both css and scss + module support is also tricky when it comes to other bundlers, even if they offer built in support for sass, if you want to have css and scss modules together, it will create quirks. same goes for PWA support, which needs plugin for build tools like Vite. but in CRA you can directly attach service worker to the index.html.
there are lots of great features. after all, CRA saves you lots of time. I tried to build projects with Vite, Parcel and webpack (custom configuration) and no of them were straightforward as CRA. you might not see an issue in right after the project build but it will show problems throughout the project. |
@Ali-Milani-13 This might be a tad out of context, but I've always been using create-react-app. Now that I'm planning to start a huge project, after lots of research and testing, I felt Vite was the way to go. However, your comments did make me hesitate. Can you explain some of these "it will show problems throughout the project" issues that you saw, for example, in Vite? Thank you! |
Hi there. so, these were couple of the issues I've encountered so far. ( I don't remember all of them )
CRA only gives you blank page if you have uncaught exceptions and even then, you can check your console and find the exact issue.
I don't want to mock any open-source project. keep that in mind. for my use case, I really want to stick with CRA. so, if Vite floats your boat, go for it. since CRA is extremely slow during dev mode + tailwind doesn't go well with CRA because of postCSS issues. so, you have to make your own decision. what everything comes with tradeoff. I traded couple seconds of build and compile time + EXTEREMLY large module bundler to have a framework like experience and everything just works. keep that in mind. I consider CRA as a "semi framework" for React. it has its own structure and capabilities. but once you want more or a little bit customization, you will have to either |
@ahmadi3d |
Whether we like it or not, Vite has already won. The numbers speak for themselves: 16 million downloads for Vite compared to 100k for CRA. [npm downloads](https://npmtrends.com/create-react-app-vs-vite) Even the new React documentation removed CRA, and they recommend starting new projects with either a framework or Vite. If fragmentation is a concern, the focus should be on moving away from CRA, not resisting Vite. Think about the amount of effort required to modernize CRA’s messy codebase to match Vite. Why reinvent the wheel? Vite is faster, simpler, and more future-proof. |
@nivethan-dev your graph is flawed in that create-react-app is a CLI used to generate |
@bmuenzenmeyer thanks for pointing it out. so 17.6 million vs 2.7 million 🤷🏻♂️ |
Is your proposal related to a problem?
the most known problem of the CRA of course. maintenance, debugging and speed.
Describe the solution you'd like
referring to this issue at react dev #11262
I think we've gone so far with front end, and it was unnecessary. open source is beautiful but causing fragmentation now, especially with this CRA case.
from my understanding, the main reason why developers are getting excited by Vite or build tools like that are 2 reasons:
they are faster
they are less buggy
so, there's no need to really ditch CRA or convert it to something completely new. with proper and updated tools, it will be ok.
Describe alternatives you've considered
as a developer, I chose web development as a job not hobby and I'm sure me and thousands of other developers have a life to live. I can't really afford, hacking with Vite config and submitting issues and diving into plugin eco system. create-react-app offered an amazing zero config way to just set the project up and running and now we are losing this tool. I haven't touched webpack config or any bundler config for 3 years and that saved lots of time. it was perfect.
my suggestion might look naive, but I suggest ditching all deprecated dependencies and replacing old and slow tools with newer ones.
there's no force to do all of them at 1 night.
if there are no qualified libraries and dependencies to replace the old ones, it's ok. it can stay that way for a while.
Additional context
we can keep it simple. we don't really need top to bottom 100% revolutionary reconstruction. CRA needs a bit of housekeeping. I think other proposed solutions are either exteremly complex or hard to deploy.
please consider updating underlying dependencies and their vulnerabilities. this step itself, will add convince to further improvements and replacing slow libraries with newer and faster ones.
The text was updated successfully, but these errors were encountered: