mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-08 13:52:36 +02:00
fix: text/link hydration bug (#5629)
This commit is contained in:
parent
09550b0535
commit
9d129631b6
2 changed files with 32 additions and 1 deletions
|
@ -133,7 +133,7 @@ async function doRender(locals) {
|
||||||
try {
|
try {
|
||||||
// Minify html with https://github.com/DanielRuf/html-minifier-terser
|
// Minify html with https://github.com/DanielRuf/html-minifier-terser
|
||||||
return await minify(renderedHtml, {
|
return await minify(renderedHtml, {
|
||||||
removeComments: true,
|
removeComments: false,
|
||||||
removeRedundantAttributes: true,
|
removeRedundantAttributes: true,
|
||||||
removeEmptyAttributes: true,
|
removeEmptyAttributes: true,
|
||||||
removeScriptTypeAttributes: true,
|
removeScriptTypeAttributes: true,
|
||||||
|
|
31
website/_dogfooding/_pages tests/hydration-tests.js
Normal file
31
website/_dogfooding/_pages tests/hydration-tests.js
Normal file
|
@ -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 (
|
||||||
|
<span>
|
||||||
|
Built using the{' '}
|
||||||
|
<a href="https://www.electronjs.org/" target="_blank">
|
||||||
|
Electron
|
||||||
|
</a>{' '}
|
||||||
|
, based on{' '}
|
||||||
|
<a href="https://www.chromium.org/" target="_blank">
|
||||||
|
Chromium
|
||||||
|
</a>
|
||||||
|
, and written using{' '}
|
||||||
|
<a href="https://www.typescriptlang.org/" target="_blank">
|
||||||
|
TypeScript
|
||||||
|
</a>{' '}
|
||||||
|
, Xplorer promises you an unprecedented experience.
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Home() {
|
||||||
|
return (
|
||||||
|
<Layout>
|
||||||
|
<BuggyText />
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue