Deploy spkg app package solution (SPFX) to SharePoint Online
Determine whether you need to deploy the solution to all sites or a specific site collection.
Deploy spkg solution (SPFx) to all Sites
Prerequisite
- Ensure the spkg package is prepared correctly.
- Dedicated app catalog site.
- Go to Apps for SharePoint (aka App catalog site).
- Click Upload and select the spkg package.
- Select "Add to all sites" option.
- Confirm the upload and ensure there are no errors.
- Verifify that the app is availalbe in the App Catalog as well as in a test site of your choice.
Site Collection Specific Deployment
Prequisite
- After peparing the spkg package, ensure that the app is uploaded in a dedicated app catalog and is marked as "Added to All sites" - No, with no errors message for the package.
- Go to Site Contents of the target site collection.
- Click New>App
- Select the app that you want to deploy to the site collection.
!!! note
Don't see the app? Check to ensure the app is deployed in a dedeicated app catalog for the tenant.
Packaing the project for deployment
Steps.
- run
gulp bundle - run
gulp package-solution. - Go to /sharepoint/solutions folder and identify a file with .sppkg extension. Grab this file for deployment.