1

I am new to SPFx, and I was wondering how can we update the solution after packaging it for the first time?

Do I need to run the gulp package-solution --ship and add the sppkg file to SharePoint?

Kind Regards

1 Answer 1

2

The build chain of an SPFX Project is the below:

  1. gulp bundle --ship
  2. gulp package-solution --ship

The above chain produces a set of files(js, manifests and the sppkg) that implement your solution.

In order to upload or update your solution, all you have to do is to upload the produced sppkg file to the App Catalog and the manifests/js to the Cdn location defined in config\write-manifests.json of the SPFX project.

It is good, in general terms, to version each build to be incremented by the feature that you are trying to introduce to the SPFX App, but in general, versioning will not stop the update procedure.

More on versioning here

*the upload of the js/manifests depends on the target version of SharePoint and if the flag includeClientSiteAssets is set to true (for example, SP2016 does not support it)

2
  • Something that i forgot is that you can use the gulp clean command to clean up old Build Files.
    – jimas13
    Apr 12, 2022 at 7:46
  • Be sure to check in the solution in the app catalog! Easy to miss on updates Apr 12, 2022 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.