Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React.lazy causes app to break when new version is deployed #58

Closed
gearnode opened this issue Mar 20, 2025 · 0 comments
Closed

React.lazy causes app to break when new version is deployed #58

gearnode opened this issue Mar 20, 2025 · 0 comments
Labels
complexity: hard Complex changes, requires deep knowledge component:frontend Related to frontend/UI priority:high High priority, should be addressed soon

Comments

@gearnode
Copy link
Contributor

When deploying new versions of my React application that uses code splitting with React.lazy, users who already have the previous version open in their browsers experience broken functionality. This occurs because:

  1. The user loads the application (version A)
  2. We deploy a new version (version B) with updated chunks
  3. When the user navigates to a route that triggers lazy loading, the app attempts to load a chunk that no longer exists or has a different hash in the new deployment
  4. This results in a chunk loading error and breaks the application:
Uncaught (in promise) ChunkLoadError: Loading chunk [chunk-id] failed.
(error: https://us.console.getprobo.com/static/js/[chunk-id].chunk.js)
@gearnode gearnode added complexity: hard Complex changes, requires deep knowledge component:frontend Related to frontend/UI priority:high High priority, should be addressed soon labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: hard Complex changes, requires deep knowledge component:frontend Related to frontend/UI priority:high High priority, should be addressed soon
Projects
None yet
Development

No branches or pull requests

1 participant