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

Fixes dynamic chunks preload (#4992)

based on [this](https://spectrum.chat/thread/0d24d6cc-96f9-46f0-aa86-515c1b1caac9?m=MTUzNDc2MjA3MzkyMQ==) conversation
This commit is contained in:
Faris Abusada 2018-08-20 15:19:36 +03:00 committed by Tim Neutkens
parent a9a3fc1fca
commit 15e6cb8ddf

View file

@ -67,8 +67,8 @@ export class Head extends Component {
getPreloadDynamicChunks () {
const { dynamicImports, assetPrefix } = this.context._documentProps
return dynamicImports.map((bundle) => {
return <script
async
return <link
rel='preload'
key={bundle.file}
src={`${assetPrefix}/_next/${bundle.file}`}
as='script'