简体   繁体   中英

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, ie tracking the repo manually, looking for diffs, copying and pasting and so on.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM