diff --git a/packages/docusaurus/src/client/serverEntry.js b/packages/docusaurus/src/client/serverEntry.js index 029d9fb803..ea74e0516c 100644 --- a/packages/docusaurus/src/client/serverEntry.js +++ b/packages/docusaurus/src/client/serverEntry.js @@ -133,7 +133,7 @@ async function doRender(locals) { try { // Minify html with https://github.com/DanielRuf/html-minifier-terser return await minify(renderedHtml, { - removeComments: true, + removeComments: false, removeRedundantAttributes: true, removeEmptyAttributes: true, removeScriptTypeAttributes: true, diff --git a/website/_dogfooding/_pages tests/hydration-tests.js b/website/_dogfooding/_pages tests/hydration-tests.js new file mode 100644 index 0000000000..308930a25d --- /dev/null +++ b/website/_dogfooding/_pages tests/hydration-tests.js @@ -0,0 +1,31 @@ +import React from 'react'; +import Layout from '@theme/Layout'; + +// Repro for hydration issue https://github.com/facebook/docusaurus/issues/5617 +function BuggyText() { + return ( + + Built using the{' '} + + Electron + {' '} + , based on{' '} + + Chromium + + , and written using{' '} + + TypeScript + {' '} + , Xplorer promises you an unprecedented experience. + + ); +} + +export default function Home() { + return ( + + + + ); +}