
Don't Eject Your Create React App - level
https://medium.com/curated-by-versett/dont-eject-your-create-react-app-b123c5247741
======
ardfie
What I got when I followed the link

[http://imgur.com/3gcROaQ](http://imgur.com/3gcROaQ)

Medium is shockingly bad. I see absolutely no value in this service any more.

~~~
wilkystyle
I have reader mode permanently enabled for medium.com for Safari on iOS, and
on Chrome for MacOS I have Ublock Origin rules to heavily filter out elements
on the page.

------
ng12
I just wish CRA would give me a hook to touch the webpack configs. I'm willing
to bite the pain of needing to rewrite my custom configs if they move to
something else.

Simple example: with webpack it's trivial to configure it to load env-specific
extensions. You can have foo.js, foo.dev.js, and foo.mock.js and it will
import the correct one automatically based on an env variable. It's three
lines of code that I use in all my React projects and it's honestly enough to
keep me away from CRA.

~~~
level
The article covers the use-case of making small modifications to the build.
react-app-rewired[1] and customize-cra[2] give you access to tweak the webpack
build indirectly. While babel-macros[3] in CRA 2.X give you access to the
babel transpilation step without having to eject. While it's not exactly what
you're referring to, it does get you a little bit closer to the build.

[1] [https://github.com/timarney/react-app-
rewired/](https://github.com/timarney/react-app-rewired/)

[2] [https://github.com/arackaf/customize-
cra](https://github.com/arackaf/customize-cra)

[3] [https://babeljs.io/blog/2017/09/11/zero-config-with-babel-
ma...](https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros)

------
JustinBrown
Agreed. It's becoming harder and harder to justify managing your own React
pipeline, even in the rare cases where something might be missing that I want
included.

------
hyfgfh
Don't even use create react app

~~~
thallada
[https://www.npmjs.com/package/dont-create-react-
app](https://www.npmjs.com/package/dont-create-react-app)

------
tbirrell
Can someone explain what ejection is? I'm not familiar with this terminology.
How is it different from say, editing your package.json or webpack.mix.js
files?

~~~
yellowsir
reace-create-app has predefined configs in packages which you can't edit
unless you eject them (copy to your own project and update the links) but you
won't get updates anymore.

------
ojhughes
It really blows my mind that the latest, greatest technology is so difficult
to work with it requires a meta-tool manage the process.

~~~
ng12
CRA actually has almost nothing to do with React and a whole lot to do with
other tools (Babel, ES6, Webpack, Jest). You don't need most of them to build
a React application, it's mostly about developer experience and the
surrounding ecosystem.

FWIW Angular does the same thing with Angular-CLI. The "problem" is the web
dev ecosystem, not React itself.

