Skip to content

Commit

Permalink
fix(preloader): fix vite dynamic module loading error
Browse files Browse the repository at this point in the history
  • Loading branch information
nurikk committed Dec 30, 2024
1 parent 9c00a0a commit c66150a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ const domNode = document.getElementById('root');
if (domNode) {
createRoot(domNode).render(<Main />);
}

// https://vite.dev/guide/build#load-error-handling
window.addEventListener('vite:preloadError', () => {
window.location.reload();
});

This comment has been minimized.

Copy link
@LaurentChardin

LaurentChardin Jan 2, 2025

Contributor

Should run npm run pretty as there is a missing newline that breaks the codestyle check

0 comments on commit c66150a

Please sign in to comment.