add polyfill
This commit is contained in:
parent
8fa4d134b2
commit
c5c7c7f809
|
@ -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
|
Reference in New Issue