add polyfill

This commit is contained in:
Eddie Wang 2019-12-05 14:23:18 -05:00
parent 8fa4d134b2
commit c5c7c7f809
No known key found for this signature in database
GPG Key ID: DBFB3E83121BEDD1
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
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>
<Head>
<script src="https://unpkg.com/web-streams-polyfill/dist/polyfill.min.js"></script>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
export default MyDocument