1 Create ReactJS app
Create any react app as usual you do. There is nothing special you need to configure to use the react app code in existing website.
2 Add the .env file at the root of this application
This file would contain some configuration values that will be used by build tool.
3 Add the INLINE_RUNTIME_CHUNK=false in .env file
This configuration would allow to create separate packaged code of entire react app at one place.