react-boilerplate / react-boilerplate-cra-template

:fire: Setup Create React App with React Boilerplate. Highly scalable & Best DX & Performance Focused & Best practices.
https://react-boilerplate.github.io/react-boilerplate-cra-template/
MIT License
1.87k stars 392 forks source link

Ejecting from CRA #215

Open rishu605 opened 1 year ago

rishu605 commented 1 year ago

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 ?

Clemios commented 1 year ago

@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 👋