Does _document.mdx
work?
#2194
-
When I try to add a custom document with the // _document.mdx
import { Html, Head, Main, NextScript } from 'next/document'
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
} I encounter the error below, NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted Is the A related issue: #1634. |
Beta Was this translation helpful? Give feedback.
Answered by
dimaMachina
Aug 23, 2023
Replies: 1 comment
-
do not use _document.mdx, use regular jsx or tsx |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
realfish
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
do not use _document.mdx, use regular jsx or tsx