You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add troubleshooting section about CDN URL gotcha (#3164)
* Add troubleshooting section about CDN URL gotcha
This PR adds a new section to the troubleshooting document explaining a gotcha where the javascript asset file can be incorrectly linked when `config.asset_host` is configured with different URLs in different environments and assets are not re-compiled between those environments.
As the new section explains this is common on Heroku where the user is encouraged to use their pipeline promote feature that does not re-compile assets between apps.
A common pattern is to use one app as a staging environment to evaluate builds. Upon acceptance, the staging app is “promoted” to the production environment. If `WEBPACKER_ASSET_HOST` is not set to an empty value in the staging application that application’s CDN URL will be compiled into the manifest.json file and reused in the production application.
This issue can be tricky to detect as there might be no immediate error. The file probably still exists as it’s used by staging. When the staging environment later is re-deployed with new finger-printed assets the CDN will eventually remove the asset files that production is still dependent on.
* Use more correct term "host" over "URL"
Small update to the copy where the term URL was incorrectly used.
Co-authored-by: Nicklas Ramhöj <[email protected]>
0 commit comments