OlivierCC / spfx-40-fantastics

This package is a sample kit of Client Side Web Parts built on the SharePoint Framework SPFx. You can find here different kind of high visual web parts as carousel, images galleries, animations, map, editors, etc.
MIT License
412 stars 277 forks source link

Is it possible to separate this package and only install specific web parts? #56

Open Ewan1 opened 7 years ago

Ewan1 commented 7 years ago

Tremendous effort on these webparts! We have a need to a few specific web parts, but not all 40. Is it possible/easy to separate and load specific web parts vs the entire bundle? thx

spjeff commented 7 years ago

PowerShell to the rescue! Got ya covered.

http://www.spjeff.com/2017/11/02/reduce-sppkg-webparts-features-with-powershell/

The below steps will reduce a SPPKG to only select Features and WebParts we want to keep. Every SPPKG file is actually a ZIP with XML manifest and subfolder for each WebPart and Feature. Extracting the SPPKG as ZIP allows us to review the internal content, enumerate all Features, and then select ones to keep in a final compressed ZIP file (SPPKG file).

If you want to upload only a few WebParts from a SPPKG package to Office 365’s App Catalog then check out the video below.

Cheers!

image_4

Blaksey commented 7 years ago

@spjeff When I used the script it created a new sppkg but when I loaded it into my AppCatalog it gives the following error The package contains the wrong number of relationships for relationship type 'http://schemas.microsoft.com/sharepoint/2012/app/relationships/package-manifest'. Expected: '1'. Actual: '0'.

Any idea what's going wrong?

premaarya commented 7 years ago

I am getting the same error .. anyone resolved this? The package contains the wrong number of relationships for relationship type 'http://schemas.microsoft.com/sharepoint/2012/app/relationships/package-manifest'. Expected: '1'. Actual: '0'.