Forum Discussion
Akhil_Arelli1309
Mar 16, 2020Copper Contributor
How to deploy a React application into Sharepoint Online?
I created a sample React application running in http://localhost:3000/ . Now this application should run within sharepoint. what is the procedure? can any one suggest a solution.
chariotlily
Jul 19, 2022Copper Contributor
OMG I am so sorry to bother after 2 years but this is exactly what I'm trying to do right now. Do you mind share how it goes? Are you able to run react app within sharepoint? Thank you!
- ntnbnslJul 27, 2022Copper Contributor
By any chance, if guys reach to any solution??
- xomrayJul 18, 2024Copper Contributor
ntnbnsl -- I found a workaround. Just 'npm run build' and take the contents of that build folder and drop into a folder on Sharepoint. That folder should include any static files and your root html page. Note: in your package.json file, your homepage (i think) matters. try ".", or try the url path of the SHarepoint folder the files live in. I fumbled through this workaround, but works okay for me.
Now, everytime you want to make changes to the site, you will need to rebuld the site and drag/drop/replace those files in the Sharepoint folder.