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

jimas13
  • 318
  • 2
  • 13
Harris
  • 593
  • 1
  • 8
  • 33

1 Answers1

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)

jimas13
  • 318
  • 2
  • 13