renderPrefetchLinks() — vue Function Reference
Architecture documentation for the renderPrefetchLinks() function in index.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 8c5b1a07_0b32_1aa6_3df4_33a0a3225d72["renderPrefetchLinks()"] 7f02213e_fb34_2058_966a_5fea6f3a95d9["renderResourceHints()"] 7f02213e_fb34_2058_966a_5fea6f3a95d9 -->|calls| 8c5b1a07_0b32_1aa6_3df4_33a0a3225d72 072c2c94_8252_4199_9b74_22be796294bc["getUsedAsyncFiles()"] 8c5b1a07_0b32_1aa6_3df4_33a0a3225d72 -->|calls| 072c2c94_8252_4199_9b74_22be796294bc style 8c5b1a07_0b32_1aa6_3df4_33a0a3225d72 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