1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Pulled encoding to top of head (#3214)

This commit is contained in:
yashha 2017-11-16 11:54:36 +01:00 committed by Tim Neutkens
parent ccb188ab6b
commit a0e0f851c2

View file

@ -84,11 +84,11 @@ export class Head extends Component {
const pagePathname = getPagePathname(pathname, nextExport)
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/_error/index.js`} as='script' />
{this.getPreloadDynamicChunks()}
{this.getPreloadMainLinks()}
{(head || []).map((h, i) => React.cloneElement(h, { key: i }))}
{styles || null}
{this.props.children}
</head>