Deploying a library component
Deployment of a library component can be done in the tenant app catalog or in a site collection app catalog using the same process as any SPFx solution. From the Packt.Solutions.ProductManagement.Library folder, containing our library, we run the following commands:
> gulp bundle --ship > gulp package-solution --ship
This will bundle and create the *.sppkg file.
The next step is to upload that package into the tenant app catalog or site collection app catalog. An important remark here: when deploying a library component, always check Make this solution available to all sites in the organization. This is because libraries are meant to be global and not deployed manually per site.
Note
You can only host one library component version at a time in a tenant.
The next step is to deploy our web parts solution with a dependency to the library.
From the Packt.Solutions.ProductManagement.Parts folder, we update the package.json file to...