When new version is deployed, active users get broken dependencies

When building a new version of my webapp (Ionic 4), the output files are generated with a new file name. This is great to avoid caching issues, but when I update the files on the web server, existing users get a broken experience.

The webapp itself is simple enough with 3 pages, where the users spend most of their time on the 1st page.

If I push a new version of my webapp, the currently active users who have not yet visited page 2 and 3 get an error message, because the dependencies for those pages have not yet loaded and they no longer exist

My work around for now is to copy all of the output files in the old “www” folder into the new one, so that browsers that loaded the previous version before the update can find the files, but there must be a better way.

How do you solve it? I would prefer a single bundle with all the files, but from what I understand it is not part of the design of Ionic.