I was able to successfully build the package and deploy it to CDN and Sharepoint, it's working fine for the first release.

If I want to update the typescript code to change my UI/logic and release a next version "gulp --ship" creates a new bundled file under "temp/deploy" if I deploy the new file to Azure CDN changes are not affecting in my Sharepoint page.

The changes are affected only when I update the .sppkg file because the JSON file under "temp/deploy" holds the reference for the new bundled file in the json node "loaderconfig/script resources".

I'm building the multi-tenant application so for small fixes, it's not advisable to ask the client include the app package in their appcatalog.

Can someone suggest the workaround for this?

  • One workaround is copy paste the code from new bundled file to existing bundled file and update the "loaderconfig/script resources" to point the existing bundled file. Oct 14, 2017 at 14:28

1 Answer 1


The reason for this is that you can't control client caching, so if you updated file contents but not its name, it could be that your changes would be visible only to some users or wouldn't be visible at all.

If you optimize your hosting location for delivery of static assets, then most likely you will choose to far-future expiration so that your scripts are cached as long as possible. But whenever you change your scripts, in order to ensure that users actually see these changes, you have to force them to re-download the scripts which you can do through a new deployment with a unique file name.

  • We are building multi-tenant INTRANET application so we can't ask the client include the app package in their appcatalog often. So we tried this, 1. Maintained the track of the bundle file name and on new builds renamed the bundled file. 2. To avoid the files cached in the CDN we have used deploy-azure-cdn npm command and set the maximum age for caching file to 1 minute so everytime they refresh the page it will get the latest version from Storage container. Since our bundle files are small in size there is no major latency. Jun 5, 2018 at 5:48
  • Even if your bundles are small, they still require the browser to establish a connection with the server and download the file. Not only this slows down the loading of the portal but also adds to network traffic and Azure costs, especially if the portal is used by many users. Jul 13, 2018 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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