Skip to content
Discussion options

You must be logged in to vote

You could add a custom pages/_document.js per the docs

import Document, { Html, Head, Main, NextScript } from 'next/document'

class MyDocument extends Document {
  static async getInitialProps(ctx) {
    const initialProps = await Document.getInitialProps(ctx)
    return { ...initialProps }
  }

  render() {
    return (
      <Html lang="en">
        <Head />
        <body>
          <Main />
          <NextScript />
        </body>
      </Html>
    )
  }
}

export default MyDocument

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@timneutkens
Comment options

Answer selected by jamesmosier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants