Lazy Route Dynamic Import Failure Retries #2827
ericchernuka
started this conversation in
Ideas
Replies: 1 comment
-
we already handle dynamic import errors here: https://github.com/TanStack/router/blob/main/packages/react-router/src/lazyRouteComponent.tsx#L10 https://github.com/TanStack/router/blob/main/packages/react-router/src/lazyRouteComponent.tsx#L73 Can you please check if this is working for you? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We seem to be getting a relatively high number of failures related to "failed to fetch" errors related to lazy dynamic imports. In the past with React.lazy we would often opt to leverage a library such as https://github.com/fatso83/retry-dynamic-import to handle retries to ensure the component resolves. Most of these errors seem to occur once we deploy a new version of the SPA (we're on Cloudflare Pages).
Wondering if there's an opportunity to add a thin layer around the route codegen to enable retries so that we can try to resolve the failed import if it fails on the first attempt.
Beta Was this translation helpful? Give feedback.
All reactions