Commit a0e0f851 authored by yashha's avatar yashha Committed by Tim Neutkens

Pulled encoding to top of head (#3214)

parent ccb188ab
...@@ -84,11 +84,11 @@ export class Head extends Component { ...@@ -84,11 +84,11 @@ export class Head extends Component {
const pagePathname = getPagePathname(pathname, nextExport) const pagePathname = getPagePathname(pathname, nextExport)
return <head {...this.props}> return <head {...this.props}>
{(head || []).map((h, i) => React.cloneElement(h, { key: i }))}
<link rel='preload' href={`${assetPrefix}/_next/${buildId}/page${pagePathname}`} as='script' /> <link rel='preload' href={`${assetPrefix}/_next/${buildId}/page${pagePathname}`} as='script' />
<link rel='preload' href={`${assetPrefix}/_next/${buildId}/page/_error/index.js`} as='script' /> <link rel='preload' href={`${assetPrefix}/_next/${buildId}/page/_error/index.js`} as='script' />
{this.getPreloadDynamicChunks()} {this.getPreloadDynamicChunks()}
{this.getPreloadMainLinks()} {this.getPreloadMainLinks()}
{(head || []).map((h, i) => React.cloneElement(h, { key: i }))}
{styles || null} {styles || null}
{this.props.children} {this.props.children}
</head> </head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment