1

I am following this article to deploy add a script editor extension:

https://medium.com/niftit-sharepoint-blog/add-the-script-editor-webpart-back-to-sharepoint-modern-experience-688a7b7208e4

I've activated my CDN and I can build using --ship and deploy web parts or extensions to my SharePoint Online App Catalog and add them successfully in my pages.

The only problem is: I don't know the path to my CDN is.

I know I have enabled Office 365 public CDN and that I am using it but I don't know how to fill this:

"cdnBasePath": "-- PATH TO CDN --"

in the step 2 of the aforementioned article.

1

The CDN path can be configured in three ways :

  1. Azure CDN
  2. Office 365 Public CDN
  3. SharePoint Library in your tenant

How to configure the CDN in Office 365?

Follow the below steps:

How to Update CDN Path in the SPFx project file?

  • Open write-manifests.json from config folder

  • Update CDN base path as Office 365 CDN end point https://publiccdn.sharepointonline.com/[tenant]/sites/[site-collection-name]/[document-library]/[folder] 

Using the below command Prepare the package

gulp bundle --ship 

Using the below command Deploy Package to SharePoint

gulp package-solution --ship

For details refer to the below article :

SharePoint Framework - Deploy SPFx WebParts To Office 365 Public CDN

  

| improve this answer | |
1

Path of CDN you have to pick, basically it is the location where all you files stored. it can be anywhere inside your site collection, as in your reference blogs, he created a new folder "CDN" inside the Site assets library.

You can do the same, go to your site collection > site content > Site assets > Now create a Folder "CDN" no use that path. it will be like this "https://tenantname.sharepoint.com/sites/Sitecollectionname/siteassets/CDN"

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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