From ada944766a8233f50a36a21e2a1315b521c91940 Mon Sep 17 00:00:00 2001 From: Ben Furber Date: Tue, 30 Jul 2024 11:09:16 +0100 Subject: [PATCH] fix: prod users seeing a dynamic import error --- src/App.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 80d2d8171e..1d7178b863 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,6 +11,13 @@ import { Pages } from './pages' export const App = observer(() => { const rootStore = useCommonStores() + + // To handle when hosting deletes the assets from previous deployments + // https://vitejs.dev/guide/build#load-error-handling + window.addEventListener('vite:preloadError', () => { + window.location.reload() + }) + return (