DEV Community

Discussion on: Don't use create-react-app: How you can set up your own reactjs boilerplate.

Collapse
 
mehyam profile image
MehYam • Edited

I'm not crazy (CRAzy?) about CRA either, but I do use it and have found workarounds to two of the points you mention:

  • there are several npm packages that allow more customization of the CRA tsconfig.json, so you can do things like link external project folders

  • depending on your deployment platform, you can make a monorepo work. I have a server node instance that runs separate of CRA, and the CRA instance proxies unhandled requests back to it (CRA has built-in support for this). At build+deployment time, the CRA project builds to a dist folder that the main project assumes responsibility to serve, so the whole thing can run as a single server instance

Neither of these steps are very confidence inspiring, but then neither is maintaining your own custom build stack. I've done that for personal projects in the past, and it runs into a problem where you have to futz with it just infrequently enough that you forget what you did last time, and have to relearn it all over each time. Between that and the CRA boilerplate, I'm not sure what's better.