question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto reload page when chunk assets are not found

See original GitHub issue

References: #6639

We had this feature in Nuxt 2. Basically what happens is with a new deployment, hashes of old js chunks will be changed. And if users already loaded the page with manifest and chunks of the last deployment, they fail when navigating on client-side that tries to load dynamic chunks.

There are several ways to resolve this issue but probably the safest and easiest, is that same as Nuxt 2 we make use of a global error handler that identifies such errors and reload pages. (Note for implementation: We should set a LocalStorage key to avoid infinity page reloads)

Bonus: We could new offer a new nuxtApp hook such as app:chunkError that allows graceful HMR alike handling by end-user.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:8
  • Comments:14

github_iconTop GitHub Comments

6reactions
KahrLucommented, Aug 17, 2022

I hope to raise the priority of this function, For any enterprise adopting nuxt in the production environment, they does not want to see a page with all styles lost when the user opens the browser for the first time after each new deployment. Thanks @pi0

2reactions
tylerforesthausercommented, Oct 22, 2022

I’m so glad this has come up again! I didn’t realize it had been mentioned before because I’ve actually just discovered this issue and it has caused a huge pain for me and my users. Getting some eyes on this issue would be hugely appreciated 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto-reload page when Webpack chunks are outdated
If a user has the app open and tries to navigate to a page that is supposed to load an outdated chunk, part...
Read more >
How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >
Webpack from Nothing - Auto-reload Code When You Change It
Auto -reload Code When You Change It. We've got all the right tools in places to build, manage, test, deploy, and debug our...
Read more >
Why webpack-dev-server Live-Reload Is Not Working - Medium
When I modify javascript files, I have to manually run Webpack CLI to see changes to bundle.js in the local filesystem, and bundle.js...
Read more >
Refreshing the Asset Database - Unity - Manual
It looks for changes to the Asset files, and then updates the source Asset Database · It imports and compiles code-related files such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found