You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are facing a significant issue in production with Vite's Module Federation setup. When deploying new features to our microfrontend (MFE) applications, the browser caches the remoteEntry.js file. As a result, users continue to load outdated code even after a deployment. The issue is only resolved after the users manually clear their browser cache, which is causing a poor user experience in production environments.
Impact:
This issue is affecting production environments where users are unable to access new features immediately after deployment. It forces them to clear their browser cache manually, which is not a viable solution.
Request:
We are seeking guidance or solutions from the Vite team on how to handle cache invalidation for remoteEntry.js when using the Vite Module Federation plugin. Specifically:
Are there recommended strategies or configurations to ensure that remoteEntry.js always loads the latest version after a deployment?
Is this a known issue with the @originjs/vite-plugin-federation, and if so, are there any fixes or workarounds available?
Any assistance or advice would be greatly appreciated.
Additional Context:
Our use case involves multiple microfrontends communicating through Module Federation, with all components built using Vite and deployed to EKS. This issue is critical as it directly impacts the user experience in production.
The text was updated successfully, but these errors were encountered:
We are facing a significant issue in production with Vite's Module Federation setup. When deploying new features to our microfrontend (MFE) applications, the browser caches the remoteEntry.js file. As a result, users continue to load outdated code even after a deployment. The issue is only resolved after the users manually clear their browser cache, which is causing a poor user experience in production environments.
Environment:
5.2.0
1.3.6
18.2.0
Steps involved:
What We Tried:
We attempted the following cache-busting techniques, but the issue persists:
Added the following to our
nginx.conf
to prevent caching:Added these meta tags in
index.html
to control browser caching:Despite these efforts, the browser continues to cache the
remoteEntry.js
file, and users do not see the updated code until they clear their cache.Impact:
This issue is affecting production environments where users are unable to access new features immediately after deployment. It forces them to clear their browser cache manually, which is not a viable solution.
Request:
We are seeking guidance or solutions from the Vite team on how to handle cache invalidation for
remoteEntry.js
when using the Vite Module Federation plugin. Specifically:Are there recommended strategies or configurations to ensure that
remoteEntry.js
always loads the latest version after a deployment?Is this a known issue with the
@originjs/vite-plugin-federation,
and if so, are there any fixes or workarounds available?Any assistance or advice would be greatly appreciated.
Additional Context:
Our use case involves multiple microfrontends communicating through Module Federation, with all components built using Vite and deployed to EKS. This issue is critical as it directly impacts the user experience in production.
The text was updated successfully, but these errors were encountered: