Not sure why it says HMR ? I dont assume you have npm run dev running on production?
Is this using inertia? Inertia has a built in method for handling this problem
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Can someone help me understand how HMR can be achieved on a production? Or at least point me to the right direction.
Currently there is Nginx serving current directory.
Current comes from Envoyer.io and server is on Forge.
npm run build runs vite build which produces VueJS components including hash. E.g. dist/assets/Home.e7287389.js ...
After changes have been made, Envoyer deploys new npm run build and the current now points to a new release directory, but the Client is still clicking on the old VueJS components, because they are cached by the browser, or even worse - the Client is clicking on old VueJS components (which haven't been loaded jet) and they are 404 - new files have been generated>
Failed to load module script ... and
TypeError: Failed to fetch dynamically imported module:
window.location = "/"; isn't really an option, because the Client could be halfway in a <form> input and noone want's an angry client.
Please or to participate in this conversation.