Bogdan Slovyagin
Bogdan Slovyagin

Reputation: 1139

How to extend create-react-app?

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.

Upvotes: 1

Views: 1657

Answers (1)

Oskar
Oskar

Reputation: 2083

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.

Upvotes: 5

Related Questions