How to extend create-react-app?

1.6k views Asked by At

Is there a way to extend wonderful create-react-app with my own libs, webpack configs, dotfiles, etc., but keep it up to date?

I mean, I want to eject it, then polish it to my needs but get the latest updates without big pain, i.e. tracking the repo manually, looking for diffs, copying and pasting and so on.

1

There are 1 answers

0
Oskar On BEST ANSWER

Yes, actually you can! What you do is that you fork, modify and publish react-scripts and refer to those when scaffolding with create-react-app:

$ create-react-app my-app --scripts-version react-scripts-fork

Here you can read more about react-scripts.

Here is an article about how to fork and modify react-scripts to your own needs.

It might be that custom-react-scripts already has implemented what you are looking for, ie SASS or decorators. Here is an article about custom-react-scripts and here is the package.