/opt/canhelp/node_modules/next/dist/esm/next-devtools/shared
NameSizeModeActions
console-error.js8060644editdlrm
console-error.js.map16250644editdlrm
deepmerge.js8470644editdlrm
deepmerge.js.map16470644editdlrm
devtools-config-schema.js7990644editdlrm
devtools-config-schema.js.map17050644editdlrm
forward-logs-shared.js14200644editdlrm
forward-logs-shared.js.map38180644editdlrm
hydration-error.js560644editdlrm
hydration-error.js.map3330644editdlrm
react-18-hydration-error.js19460644editdlrm
react-18-hydration-error.js.map33830644editdlrm
react-19-hydration-error.js27320644editdlrm
react-19-hydration-error.js.map46260644editdlrm
stack-frame.js48350644editdlrm
stack-frame.js.map83490644editdlrm
types.js460644editdlrm
types.js.map2160644editdlrm
version-staleness.js16600644editdlrm
version-staleness.js.map23020644editdlrm
webpack-module-path.js8230644editdlrm
webpack-module-path.js.map13830644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/next-devtools/shared/react-18-hydration-error.js (1946B)
import isError from '../../lib/is-error'; export function isHydrationError(error) { return isError(error) && (error.message === 'Hydration failed because the initial UI does not match what was rendered on the server.' || error.message === 'Text content does not match server-rendered HTML.'); } export function isHydrationWarning(message) { return isHtmlTagsWarning(message) || isTextInTagsMismatchWarning(message) || isTextWarning(message); } // https://github.com/facebook/react/blob/main/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js used as a reference const htmlTagsWarnings = new Set([ 'Warning: Expected server HTML to contain a matching <%s> in <%s>.%s', 'Warning: Did not expect server HTML to contain a <%s> in <%s>.%s' ]); const textAndTagsMismatchWarnings = new Set([ 'Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s', 'Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s' ]); const textWarnings = new Set([ 'Warning: Text content did not match. Server: "%s" Client: "%s"%s' ]); export const getHydrationWarningType = (message)=>{ if (typeof message !== 'string') { // TODO: Doesn't make sense to treat no message as a hydration error message. // We should bail out somewhere earlier. return 'text'; } const normalizedMessage = message.startsWith('Warning: ') ? message : "Warning: " + message; if (isHtmlTagsWarning(normalizedMessage)) return 'tag'; if (isTextInTagsMismatchWarning(normalizedMessage)) return 'text-in-tag'; return 'text'; }; const isHtmlTagsWarning = (message)=>typeof message === 'string' && htmlTagsWarnings.has(message); const isTextInTagsMismatchWarning = (msg)=>typeof msg === 'string' && textAndTagsMismatchWarnings.has(msg); const isTextWarning = (msg)=>typeof msg === 'string' && textWarnings.has(msg); //# sourceMappingURL=react-18-hydration-error.js.map