Monday, June 28, 2021

Where to mention the external CDN path in SPFx?

 Ans:-

If you have decided to host the SPFx app external CDN other than Office 365 public CDN, where to specify the base CDN path in SPFx? There is a setting for this in the config/write-manifests.json file which is highlighted below,

{  

  "$schema": "https://dev.office.com/json-schemas/spfx-build/write-manifests.schema.json",  

  "cdnBasePath": "https://azureCDNUrl/container/Spfx"  

Note: If you specify the external CDN path in the above image then includeClientSideAssets property setting in config/package-solution.json will be ignored and assets won’t be deployed in Office 365 CDN along with .sppkg file. A warning will be displayed in command prompt for the same as below,

SharePoint

No comments:

Post a Comment