Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const chunksPrefetch = extractor.chunks.concat(extractor.entrypoints)
- const assetsPrefetch = extractor.getChunkChildAssets(chunksPrefetch, 'prefetch')
- const linksPrefetch = assetsPrefetch.map(({chunk, linkType, scriptType, url, type}) => (
- `<link ${type === 'mainAsset' ? 'data-chunk' : 'data-parent-chunk'}="${chunk}" rel="${linkType}" as="${scriptType}" href="${url}">`
- ))
Add Comment
Please, Sign In to add comment