prependInjectFallback() — vite Function Reference
Architecture documentation for the prependInjectFallback() function in html.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 3df96a2a_db85_aa8f_52e1_204c48938b88["prependInjectFallback()"] f8fe0737_718a_5509_b722_473f207d5906["html.ts"] 3df96a2a_db85_aa8f_52e1_204c48938b88 -->|defined in| f8fe0737_718a_5509_b722_473f207d5906 fb5a3d66_7c54_2dc1_57bd_7bba8ad8fdbf["injectToHead()"] fb5a3d66_7c54_2dc1_57bd_7bba8ad8fdbf -->|calls| 3df96a2a_db85_aa8f_52e1_204c48938b88 24734732_0f40_e935_b5d1_ae08e9d1dca3["injectToBody()"] 24734732_0f40_e935_b5d1_ae08e9d1dca3 -->|calls| 3df96a2a_db85_aa8f_52e1_204c48938b88 bb1d8b71_73c3_31ff_7d80_88303fc49280["serializeTags()"] 3df96a2a_db85_aa8f_52e1_204c48938b88 -->|calls| bb1d8b71_73c3_31ff_7d80_88303fc49280 style 3df96a2a_db85_aa8f_52e1_204c48938b88 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/plugins/html.ts lines 1528–1537
function prependInjectFallback(html: string, tags: HtmlTagDescriptor[]) {
// prepend to the html tag, append after doctype, or the document start
if (htmlPrependInjectRE.test(html)) {
return html.replace(htmlPrependInjectRE, `$&\n${serializeTags(tags)}`)
}
if (doctypePrependInjectRE.test(html)) {
return html.replace(doctypePrependInjectRE, `$&\n${serializeTags(tags)}`)
}
return serializeTags(tags) + html
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does prependInjectFallback() do?
prependInjectFallback() is a function in the vite codebase, defined in packages/vite/src/node/plugins/html.ts.
Where is prependInjectFallback() defined?
prependInjectFallback() is defined in packages/vite/src/node/plugins/html.ts at line 1528.
What does prependInjectFallback() call?
prependInjectFallback() calls 1 function(s): serializeTags.
What calls prependInjectFallback()?
prependInjectFallback() is called by 2 function(s): injectToBody, injectToHead.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free