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:
parent
a9a3fc1fca
commit
15e6cb8ddf
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue