Develop And Package Client Side Web Part Files To A SharePoint Library

Create client side web part.
  • Md DeploywebparttoSP
  • Cd DeploywebparttoSP
  • Yo @microsoft/sharepoint


Run the code to open Visual Studio code.



Navigate to the write-manifests.json file in config folder to update the CDN path with SharePoint Library path.


Run "gulp bundle –ship" command to bundle the files.


Files generated will be available in temp\deploy. Upload them to SharePoint library.

Run "gulp-package gulp package-solution" to generate the app file. These files will be available in SharePoint\solution folder.



Upload the sppkg file to the pap catalog. It will prompt for trusting the solution and provide an option to deploy. Click "Deploy".





Go to SharePoint site -> Add an app-> click on the app and install it.


Edit a SharePoint page. Now, you should be able to see the client side webpart created



After adding the web part successfully, the below screen will be displayed.

Ebook Download
View all
Learn
View all