Forum Discussion
Setting up CDN on Sharepoint Online for use with Framework development
there is currently rather conflicting training advice for new SPFx developers. Can anyone confirm what is the correct guidance for this setup please? I have found these two completely different guidance docs.
in "General availability of Office 365 CDN" Vesa Juvonen - Published April 21, 2017
https://dev.office.com/blogs/general-availability-of-office-365-cdn
this proposes the command set
Set-SPOTenantCdnEnabled -CdnType Public
Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl /sites/site/library
Get-SPOTenantCdnOrigins -CdnType Public
resulting in
https://publiccdn.sharepointonline.com/<tenant host name>/sites/site/library
===
then in the latest promoted developer training video
Deploying SharePoint Framework components to production - Deploying to SharePoint CDN
this proposes a different command set (earlier?)
Set-SPOTenant -PublicCdnEnabled $true
New-SPOPublicCdnOrigin Url: https://<tenant host name>/sites/site/library
Get-SPOPublicCdnOrigins
resulting in
https://publiccdn.sharepointonline.com/<tenant host name>/1544004027c884490c55638fcb53de1f5d4897c5ea7513c1c0849dd7d8f4314cbda99429
both command sets appear to run in the latest Sharepoint Online Command shell
thanks all
- Sebastian BurrellCopper ContributorHi Kath,
they did change how it was done, I have recently followed this article and works perfectly for me: https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/hosting-webpart-from-office-365-cdn- kath pattersonIron Contributor
you are quite right, I have tried both methods now and the one that works is
Connect-SPOService -Url https://<my tenant admin>
Get-SPOTenantCdnEnabled -CdnType Public
Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl sites/spfxdev/devcdn
the CDN base path is then
{"cdnBasePath": "https://publiccdn.sharepointonline.com/<mytenanthost>.sharepoint.com/sites/spfxdev/devcdn/myfolder"}please team could someone pull the old guidance?