react-boilerplate-cra-template icon indicating copy to clipboard operation
react-boilerplate-cra-template copied to clipboard

Ejecting from CRA

Open rishu605 opened this issue 2 years ago • 1 comments

We are going to use this repo for production apps in my organization. We need to able to customize webpack configurations to setup a Micro Front End Architecture using this boilerplate. We are also planning to use swc instead of babel and typescript for transpiling and compiling respectively. Typescript will be used throughout the project with React 18.

A hard requirement is to be able to do SSR.

We also should be able to update the packages across our app periodically (as and when necessary). I guess if we don't eject, we will be dependent on CRA for upgrades to packages that have been abstracted away but we will be able to update other packages.

Is it advisable to run npm run eject and get control of everything from CRA OR is it possible for us to do the above things without ejecting ?

rishu605 avatar Dec 12 '22 11:12 rishu605

@rishu605 I started from this template to build a production ready boilerplate. As it's a CRA template it's still based on react-scripts until you eject (mostly for the Webpack part).

As CRA is unmaintained now I recommend you to eject to get control on every config layers.

I also recommend you to split the package.json on order to split different configs (e.g babel, prettier....)

If at some point you need to update the backbone of your app, you can check how the updates were made by maintainers of CRA.

Good luck 👋

Clemios avatar Jul 17 '23 13:07 Clemios