renderPrefetchLinks() — vue Function Reference
Architecture documentation for the renderPrefetchLinks() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD dfbe5974_362e_7e24_69d6_53a9f3010a6e["renderPrefetchLinks()"] d9b4566f_74ea_db87_d004_22dccd0797b4["renderResourceHints()"] d9b4566f_74ea_db87_d004_22dccd0797b4 -->|calls| dfbe5974_362e_7e24_69d6_53a9f3010a6e 743c1806_91a0_c6ef_e229_47229b4099b4["getUsedAsyncFiles()"] dfbe5974_362e_7e24_69d6_53a9f3010a6e -->|calls| 743c1806_91a0_c6ef_e229_47229b4099b4 style dfbe5974_362e_7e24_69d6_53a9f3010a6e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/server-renderer/src/template-renderer/index.ts lines 204–225
renderPrefetchLinks(context: Object): string {
const shouldPrefetch = this.options.shouldPrefetch
if (this.prefetchFiles) {
const usedAsyncFiles = this.getUsedAsyncFiles(context)
const alreadyRendered = file => {
return usedAsyncFiles && usedAsyncFiles.some(f => f.file === file)
}
return this.prefetchFiles
.map(({ file, fileWithoutQuery, asType }) => {
if (shouldPrefetch && !shouldPrefetch(fileWithoutQuery, asType)) {
return ''
}
if (alreadyRendered(file)) {
return ''
}
return `<link rel="prefetch" href="${this.publicPath}${file}">`
})
.join('')
} else {
return ''
}
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does renderPrefetchLinks() do?
renderPrefetchLinks() is a function in the vue codebase.
What does renderPrefetchLinks() call?
renderPrefetchLinks() calls 1 function(s): getUsedAsyncFiles.
What calls renderPrefetchLinks()?
renderPrefetchLinks() is called by 1 function(s): renderResourceHints.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free