An alternative to ejecting in Create React App

preview_player
Показать описание
Create-react-app is the most popular React project starter, but if you want access to the project setup & configuration files, you have to run eject - and deal with over a dozen configuration and script files.
There is a Middle ground: you can fork the react-scripts library on git (the library that contains all those script and configuration files to begin with). You will still have dozens of files to deal with, but at least they will be on git, with an upstream connection that allows you to merge any new developments back in your own config.
To spicy things up a little bit, it this video, I'll also use git subtree to get a clean and organized repository containing only your configuration.
Рекомендации по теме
Комментарии
Автор

Man this is some God tiere git management

computerscienceformathemat
Автор

This was so masterfully done!!! I had to subscribe, I do think I will have to rewatch many times to make sure I dont skip a step, but I like the way you think!!

firedforfighting
Автор

this method is no longer working, CRA makes some changes that cause "You attempted to import blahblah which falls outside of the project. You can either move it inside src/, or add a symlink to it from project's node_modules/."

alisade
Автор

About first option: So now instead of maintain bunch of script files specific to your project, now you need to keep an entire package that may impact several of your projects. I don't see the benefit.

elgeekcurioso