getConditions() — vite Function Reference
Architecture documentation for the getConditions() function in resolve.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD bf86e333_7c2b_dc8c_4e7e_7a764673f8e6["getConditions()"] dcff87b0_a8ea_57a2_3b29_a7b8f19986f3["resolve.ts"] bf86e333_7c2b_dc8c_4e7e_7a764673f8e6 -->|defined in| dcff87b0_a8ea_57a2_3b29_a7b8f19986f3 c10abc49_1d0c_ffeb_c31f_9afc51ce808b["resolveExportsOrImports()"] c10abc49_1d0c_ffeb_c31f_9afc51ce808b -->|calls| bf86e333_7c2b_dc8c_4e7e_7a764673f8e6 style bf86e333_7c2b_dc8c_4e7e_7a764673f8e6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/src/node/plugins/resolve.ts lines 1003–1022
function getConditions(
conditions: string[],
isProduction: boolean,
isRequire: boolean | undefined,
) {
const resolvedConditions = conditions.map((condition) => {
if (condition === DEV_PROD_CONDITION) {
return isProduction ? 'production' : 'development'
}
return condition
})
if (isRequire) {
resolvedConditions.push('require')
} else {
resolvedConditions.push('import')
}
return resolvedConditions
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getConditions() do?
getConditions() is a function in the vite codebase, defined in packages/vite/src/node/plugins/resolve.ts.
Where is getConditions() defined?
getConditions() is defined in packages/vite/src/node/plugins/resolve.ts at line 1003.
What calls getConditions()?
getConditions() is called by 1 function(s): resolveExportsOrImports.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free