diff --git a/server/document.js b/server/document.js index 92f6a906..5dc0a6c0 100644 --- a/server/document.js +++ b/server/document.js @@ -39,6 +39,10 @@ export class Head extends Component { _documentProps: PropTypes.any } + static propTypes = { + nonce: PropTypes.string + } + getChunkPreloadLink (filename) { const { __NEXT_DATA__, buildManifest } = this.context._documentProps let { assetPrefix, buildId } = __NEXT_DATA__ @@ -48,6 +52,7 @@ export class Head extends Component { return files.map(file => { return )) } @@ -90,9 +96,9 @@ export class Head extends Component { return {(head || []).map((h, i) => React.cloneElement(h, { key: h.key || i }))} - {page !== '/_error' && } - - + {page !== '/_error' && } + + {this.getPreloadDynamicChunks()} {this.getPreloadMainLinks()} {styles || null} @@ -136,6 +142,7 @@ export class NextScript extends Component {