未验证 提交 44932612 编写于 作者: D Daniel Stocks 提交者: GitHub

Fixed missing SSR styles in with-fela example (#17647)

Added `<Html>` and `<Head>` components in the custom `_document.js` for the with-fela example package

This fixes an issue where fela `<style>` tags were not added and sent as part of the server-side rendered HTML payload, causing a FOUC.
上级 0d1d3178
import Document, { Html, Main, NextScript } from 'next/document'
import Document, { Html, Head, Main, NextScript } from 'next/document'
import { renderToNodeList } from 'react-fela'
import getFelaRenderer from '../getFelaRenderer'
......@@ -24,6 +24,7 @@ export default class MyDocument extends Document {
render() {
return (
<Html>
<Head />
<body>
<Main />
<NextScript />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册