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

I have an issue with dynamic import after new release #778

Open
samgholipoor opened this issue Nov 3, 2024 · 1 comment
Open

I have an issue with dynamic import after new release #778

samgholipoor opened this issue Nov 3, 2024 · 1 comment

Comments

@samgholipoor
Copy link

Hello guys,

I faced an issue with pages that are lazy loaded and split chunked in new releases.
after every new release when users navigate to pages that never touch this page before gets the following error or 404:
"Failed to fetch dynamic import module: ..."

I implement cache-control header for pages, however users never see the certain page before this page is not in the cache.
how can I solve this problem? is precaching a good solution?

@sairion
Copy link

sairion commented Nov 25, 2024

it is called Version skew and usually the solution is either maintain your bundles or reload on import error. (unless you are using Vercel and your app fits their implementation...)

See vitejs/vite#11804 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants