updateReactCompilerReadme() — vite Function Reference
Architecture documentation for the updateReactCompilerReadme() function in index.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD f3902210_2f4d_8c53_6d53_b38d2fac2d4e["updateReactCompilerReadme()"] ebed723b_f143_390f_439d_dfaa680d6d16["index.ts"] f3902210_2f4d_8c53_6d53_b38d2fac2d4e -->|defined in| ebed723b_f143_390f_439d_dfaa680d6d16 d87846dd_6b47_93d5_33fb_9a71b0f3f131["setupReactSwc()"] d87846dd_6b47_93d5_33fb_9a71b0f3f131 -->|calls| f3902210_2f4d_8c53_6d53_b38d2fac2d4e 70332fa3_c6e8_f1a8_9fd8_d971f1fc35dd["setupReactCompiler()"] 70332fa3_c6e8_f1a8_9fd8_d971f1fc35dd -->|calls| f3902210_2f4d_8c53_6d53_b38d2fac2d4e feac57b5_bee2_d4b5_ec5a_d305908c5a40["editFile()"] f3902210_2f4d_8c53_6d53_b38d2fac2d4e -->|calls| feac57b5_bee2_d4b5_ec5a_d305908c5a40 style f3902210_2f4d_8c53_6d53_b38d2fac2d4e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/create-vite/src/index.ts lines 848–862
function updateReactCompilerReadme(root: string, newBody: string) {
editFile(path.resolve(root, `README.md`), (content) => {
const h2Start = content.indexOf('## React Compiler')
const bodyStart = content.indexOf('\n\n', h2Start)
const compilerSectionEnd = content.indexOf('\n## ', bodyStart)
if (h2Start === -1 || bodyStart === -1 || compilerSectionEnd === -1) {
console.warn('Could not update compiler section in README.md')
return content
}
return content.replace(
content.slice(bodyStart + 2, compilerSectionEnd - 1),
newBody,
)
})
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does updateReactCompilerReadme() do?
updateReactCompilerReadme() is a function in the vite codebase, defined in packages/create-vite/src/index.ts.
Where is updateReactCompilerReadme() defined?
updateReactCompilerReadme() is defined in packages/create-vite/src/index.ts at line 848.
What does updateReactCompilerReadme() call?
updateReactCompilerReadme() calls 1 function(s): editFile.
What calls updateReactCompilerReadme()?
updateReactCompilerReadme() is called by 2 function(s): setupReactCompiler, setupReactSwc.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free