Hacker News new | ask | show | jobs
by madeofpalk 1960 days ago
The comment I was replying to was "React has too much configuration", which I disagree with because CRA and other low-effort build tooling exists.

I like CRA, it's my default go-to because i want to avoid maintaining a webpack configuration. If you have a solution that works for you, that's good too!

1 comments

Sorry, the impetus of my comment above was that CRA is introducing FAR MORE configuration/dependency/complexity than maintaining a webpack.config.js file!

The build process of a modern React application has a certain amount of necessary complexity. Hiding it behind a "low-effort" build tool like CRA doesn't change the above and, frankly, is really a disservice to anyone who wants to understand the tools they are working with.

Go ahead, eject a CRA sometime. See how "low-effort" it really is...

I've splunked through CRA webpack config and submitted patches to the project. I've ejected and then years later un-ejected because I didnt want to maintain a webpack configuration.
I'm curious about this. I have been using the same webpack.config.js file (save modifying paths) for nearly 3 years. I kid you not, yesterday, I finally decided to upgrade to the latest version of webpack because I am about to embark on a new project[0] for the next 6-8 months. It took me roughly 20 minutes to modify the file according to the latest configuration conventions and have everything up and running exactly the same. I find it unfathomable that maintaining a short config file is "too hard".

I decided to try my hand at using CRA for the first (and last) time to build a small app at work because it had recently hit the scene, and appeared to be fast-becoming the idiomatic way of engaging with the library and ecosystem. I don't even remember why at this point anymore, but I had some issue that required me (as in the docs at the time said so) to eject the app. My jaw literally dropped after I saw what the project had become. It was... thousands of LoC. And spread across so many files!

Clearly we have different definitions of "too hard", but, to me, the task of understanding all of that was "too hard". I am simply not wired in a way such that I can use a tool without understanding how it works (obviously within reason). I have to imagine that when you say you "didn't want to maintain a webpack configuration" that you mustn't really understand what that entails, and are using the output from an ejected CRA as a proxy for what that configuration must look like. I assure you, it's rather simple. I've spent 20 minutes in the last 3 years doing so.

[0] I would estimate the kinds of apps that I build are far more complex than the vast majority of use-cases (think fantasy sports draft/league management software).