Closed tathje closed 2 weeks ago
I can confirm that this is happening on other Chromium based browsers like Arc and Brave, but things are working correctly on Safari.
There doesn't appear to be any logs or errors in the browser dev console either.
I did notice that the div ends up empty in the browsers that don't work.
Related to https://github.com/antfu/repro-chrome-v129 perhaps?
We are encountering the same issue on both Chrome and Edge after the latest version 129 update. Applications in production that rely on the vite-plugin-federation plugin have gone down completely. Could the Vite-plugin-federation team kindly look into this as a priority and provide a quick fix?
@n-anilrathod
Related to https://github.com/antfu/repro-chrome-v129 perhaps?
I believe @AlexThurston is correct. After investigating, this issue only seems to occur when HMR is enabled. Disabling HMR in development resolves the issue, but at the cost of losing Hot Reload functionality. It appears that this Chrome bug is fixed in the upcoming v130 release. I tested the beta version of Chrome with HMR enabled, and it worked without issues.
I have not encountered any problems with production builds or deployments—this only happens for me during development when Vite is running as a server with HMR enabled.
I am using vite-plugin-top-level-await plugin as a temporary workaround.
@n-anilrathod
Related to https://github.com/antfu/repro-chrome-v129 perhaps?
I believe @AlexThurston is correct. After investigating, this issue only seems to occur when HMR is enabled. Disabling HMR in development resolves the issue, but at the cost of losing Hot Reload functionality. It appears that this Chrome bug is fixed in the upcoming v130 release. I tested the beta version of Chrome with HMR enabled, and it worked without issues.
I have not encountered any problems with production builds or deployments—this only happens for me during development when Vite is running as a server with HMR enabled.
@ahatton-hpt, the issue was not related to HMR as initially thought. It appears to be linked to circular imports, similar to what's described here: https://github.com/antfu/repro-chrome-v129. To resolve the issue, I added the vite-plugin-top-level-await, which seems to fix it. However, this plugin is considered optional for the latest Chrome versions. While the issue is temporarily resolved, I hope we won't encounter similar problems in the future.
This issue has been resolved on chrome 130.
Versions
Steps to reproduce
git clone git@github.com:originjs/vite-plugin-federation.git
cd vite-plugin-federation/packages/examples/react-vite
pnpm install
pnpm run build:remotes && pnpm run serve:remotes
pnpm run dev:hosts
http://localhost:5000/
What is actually happening?
vite dev
(host app) not working on Chrome (v128 ~ v129) but still working onvite build
and another browser