import React from 'react' ; import Document , { Html , Head , Main , NextScript , DocumentContext , } from 'next/document' ; class MyDocument extends Document { static async getInitialProps ( ctx ) { const initialProps = await Document . getInitialProps ( ctx ) ; return { ... initialProps } ; } render ( ) { return ( < Html > < Head > < link rel = 'icon' href = { `${ process . env . STATIC_URL }/favicon.png` } /> < link rel = 'stylesheet' type = 'text/css' href = '//unpkg.com/antd-mobile@2.0.0-beta.6/dist/antd-mobile.min.css' / > < /Head> < body style = { { margin : 0 } } > < Main /> < NextScript / > < /body> < /Html>); } } export default MyDocument ;