feat(error-overlay): handle script under html hydration error (#63403)
script tag cannot be placed under html directly, users reported a case in #51242 that having `<Script>` under html will cause hydration error, this will display the React hydration error related warning of bad usage for it. You will see this warning in dev overlay instead of displaying nothing ``` In HTML, <script> cannot be a child of <html>. This will cause a hydration error. ``` Added two other react warnings detection patterns as well * `Warning: In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.',` * `Warning: In HTML, whitespace text nodes cann...` But tested they're not generating hydration errors, only warnings in console, so we don't need to have tests for them. Closes NEXT-2835
Showing
Please
register
or
sign in
to comment