Reputation:
Anyone got a way they handle this..
1 you build and release the frontend to prod
2 users visit the site and use the app
3 you build and release to prod a bug fix to page A, the built chunks that were affected from the new code now have a new file hash (from webpack)
4 the user is still on your site, so no need to refresh, but clicks a link to page A, but hadn't previously been to page A. Now the app throws an error as it tries to fetch a link that requires a chunk that doesn't exist anymore..
I'm configuring the pwa setup so the app will know when a new update is available... But it feels like this scenario will not be completely fixed with a pwa manifest alone. Also new to the pwa stuff.
Another idea i was toying with was to make use of the apps socket connections and push a message to all apps to refresh.. but this feels overkill
Upvotes: 2
Views: 420
Reputation: 66
Make sure you check the Service Worker registrations. It sounds to me like this might be the issue.
Upvotes: 1