Named default import of next/document
breaks build
#14543
Unanswered
harrysolovay
asked this question in
Help
Replies: 1 comment
-
Please add a complete reproduction. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Inside of
_document.tsx
, the following produces a build error:import * as React from "react"; import { Head, Html, Main, + default as NextDocument, NextScript, } from "next/document";
Feels as though it should work the same as this (successfully builds):
import * as React from "react"; + import Document, {Head, Html, Main, NextScript} from "next/document";
Ran into this:
`RangeError: Maximum call stack size exceeded
Error occurred prerendering page "/404". Read more: https://err.sh/next.js/prerender-error
RangeError: Maximum call stack size exceeded
Beta Was this translation helpful? Give feedback.
All reactions