lazy-loaded chunks of react app causing issues on new worker deployments

We’re running into an issue with lazy-loaded chunks in our React app. After deploying a new Cloudflare Worker, if a user still has the old version of the site open and then navigates to a lazily loaded route, they get an error: “Failed to fetch dynamically imported module: …/assets/…” With CloudFront, we used to fix this by running an invalidation so users always received the latest assets. Is there an equivalent mechanism for cache invalidation or forcing clients to load the newest version when using Cloudflare Workers?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?