Packaging and deploying custom solutions to SharePoint
Once testing and debugging are done, and the solution is ready, it’s time to deploy the custom solutions to SharePoint. The deployment requires the creation of a production-optimized solution package, which can then be uploaded to SharePoint App Catalog and deployed to sites:
- The first step is to create an optimized code bundle for production use by running the following:
gulp bundle --ship
The bundle task generates minified assets that need to be uploaded to the content delivery network (CDN). The optimized bundles are created in the temp/deploy folder in the project.
- The next step is to package the project code to a SharePoint Framework solution package by running the following:
gulp package-solution --ship
The package solution task creates a solution package file to the
/sharepoint/
solution folder. The solution package, which is named by default according to the project’s name and file extension, is.sppkg...