sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Used instruction from Hosting WP from O365 CDN - unsuccessfull

Open Amysno opened this issue 8 years ago • 5 comments

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.

Amysno avatar Jun 14 '18 13:06 Amysno

Are you perhaps using an old version of the framework?

tdwhite0 avatar Jun 14 '18 14:06 tdwhite0

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 avatar Jun 15 '18 09:06 Amysno

@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.

tdwhite0 avatar Jun 18 '18 15:06 tdwhite0

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.

VesaJuvonen avatar Aug 21 '18 12:08 VesaJuvonen

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

msft-github-bot avatar Jan 27 '20 12:01 msft-github-bot