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
Copy file name to clipboardExpand all lines: packages/svelte/src/internal/server/index.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -101,9 +101,13 @@ export function assign_payload(p1, p2) {
101
101
* @param {string} message
102
102
*/
103
103
functionerror_on_client(payload,message){
104
+
message=
105
+
`Svelte SSR validation error:\n\n${message}\n\n`+
106
+
'Ensure your components render valid HTML as the browser will try to repair invalid HTML, '+
107
+
'which may result in content being shifted around and will likely result in a hydration mismatch.';
104
108
// eslint-disable-next-line no-console
105
-
console.error('Svelte SSR validation error:\n\n',message);
106
-
payload.head.out+=`<script>console.error(\`Svelte SSR validation error:\n\n${message}\n\nEnsure your components render valid HTML as this will likely result in a hydration mismatch!\`)</script>`;
0 commit comments