Used instruction from Hosting WP from O365 CDN - unsuccessfull
Hello there ! I used the instructions to enable the CDN on our client's O365 tenant. Worked well : command Get-SPOTenantCdnOrigins -CdnType Public gives us the following : */MASTERPAGE */STYLE LIBRARY */CLIENTSIDEASSETS (without any pending configuration. But after gulp bundle --ship and gulp package-solution --ship, when I upload the WP on our AppCatalog, the "This client side solution will get content from the following domains:" still says "<!-- PATH TO CDN -->/". It is not replaced by "SHarepoint Online". I don't know why, I don't understand. And i really need to deploy that webpart asap. FYI : I've set "includeClientSideAssets" to false in package-solution.json (because i didn't understand the bit about it being true or false in that tutorial)
Thanks for the help ;)
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: e911c86d-76ea-3a23-f98e-7ad7b804a408
- Version Independent ID: 9c7748a8-3e63-19ed-4e69-15136603f302
- Content: Host your client-side web part from Office 365 CDN (Hello World part 4)
- Content Source: docs/spfx/web-parts/get-started/hosting-webpart-from-office-365-cdn.md
- Product: sharepoint
- GitHub Login: @spdevdocs
- Microsoft Alias: spdevdocs
Are you perhaps using an old version of the framework?
Hello @tdwhite0 :) No, my spfx is the 1.4.1 version, i've checked. I know that a 1.5 version is available, but it is only 6 days old... Any other idea ?
@Amysno Oh one more thing, does the folder your git repo is in have a space in it? I think that might have been where I saw this before.
Looking on the original message, it seems to indicate that the CDN entry in config/write-manifests.json is as follows:
- /
This would result the domain not to be updated dynamically and value to fail. You should have content of the write-manifest.jsonas follows, if you want to use automatic CDN hosting in your tenant.
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "<!-- PATH TO CDN -->"
}
If this is correctly and then the includeClientSideAssets attribute is set to true in package-solution.json, your assets will be automatically hosted from CDN or from app catalog. Based on the message, this setting was also false, which would explain the end result.
Closing this as answered for now. If there are any other issues around this, please do open a new issue, so that we do not lose track of the challenges what you might have. Thx.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues