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
hydration-overlay-initializer.js relies on presence of react-dom string in event filename, namely const isReactDomError = event.filename.includes("react-dom");. This won't work when chunk that contains ReactDOM lib is renamed. Below is an extract from a real world Webpack config:
This config puts listed dependencies inside vendor.chunk.js module which obviously does not satisfy aforementioned condition. To mitigate this issue within workbase that I'm working on, I copied the contents of hydration-overlay-initializer.js script and modified it like so:
Then this module is simply imported within bootstrap code. I believe this is not an ideal solution, but I hope it helps to shed some light on the issue as well as iterating to find a decent solution ✌️
The text was updated successfully, but these errors were encountered:
You're right. I think we can get away with removing the filename check completely. Any error message with "hydration" or "hydrating" should be good enough of a condition IMO. Would you be interested in putting up a PR? Should be a one-liner 😃
hydration-overlay-initializer.js
relies on presence ofreact-dom
string in event filename, namelyconst isReactDomError = event.filename.includes("react-dom");
. This won't work when chunk that contains ReactDOM lib is renamed. Below is an extract from a real world Webpack config:This config puts listed dependencies inside
vendor.chunk.js
module which obviously does not satisfy aforementioned condition. To mitigate this issue within workbase that I'm working on, I copied the contents ofhydration-overlay-initializer.js
script and modified it like so:Then this module is simply imported within bootstrap code. I believe this is not an ideal solution, but I hope it helps to shed some light on the issue as well as iterating to find a decent solution ✌️
The text was updated successfully, but these errors were encountered: