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.
vcima
Mar 16, 2020Brass Contributor
Hi Akhil,
You have to obtain the app, for example in my case, I have used this comands:
gulp clean
gulp build
gulp bunde --ship
gulp package-solution --ship
After this, you will have a .sppkg file.
You must leave this file in the catalog of your SharePoint:
https://xxxxxxxxxxxxxx-admin.sharepoint.com/ > More features > Apps > App catalog
Once the file is part of the catalog, set the app rights and after that go to the your sharepoint page > Settings > Add an app > Select this app
And thats all, following this steps a new component will appear with your app.
You have to obtain the app, for example in my case, I have used this comands:
gulp clean
gulp build
gulp bunde --ship
gulp package-solution --ship
After this, you will have a .sppkg file.
You must leave this file in the catalog of your SharePoint:
https://xxxxxxxxxxxxxx-admin.sharepoint.com/ > More features > Apps > App catalog
Once the file is part of the catalog, set the app rights and after that go to the your sharepoint page > Settings > Add an app > Select this app
And thats all, following this steps a new component will appear with your app.
Akhil_Arelli1309
Mar 17, 2020Copper Contributor
vcima The React application we are running is NPM builded. will this support "gulp".
- vcimaMar 17, 2020Brass Contributor
The most important is to create the file: .sppkg, obviously the way to create this file depends on your tools.In my case I have developed the component with yeoman, I have followed this steps:
https://docs.microsoft.com/es-es/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part
Regards!