getImportBindings() — vite Function Reference
Architecture documentation for the getImportBindings() function in rolldown.dts.config.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD c42be05d_966b_a923_ad97_eca3f7685621["getImportBindings()"] c2239521_b59e_589c_03c3_99028d5442bd["rolldown.dts.config.ts"] c42be05d_966b_a923_ad97_eca3f7685621 -->|defined in| c2239521_b59e_589c_03c3_99028d5442bd c95eddef_3bfe_b2eb_a638_ac6578c67700["getAllImportBindings()"] c95eddef_3bfe_b2eb_a638_ac6578c67700 -->|calls| c42be05d_966b_a923_ad97_eca3f7685621 65135db8_8ed7_6a52_8043_b6b6aa693f76["stringifyModuleExportName()"] c42be05d_966b_a923_ad97_eca3f7685621 -->|calls| 65135db8_8ed7_6a52_8043_b6b6aa693f76 style c42be05d_966b_a923_ad97_eca3f7685621 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/rolldown.dts.config.ts lines 172–200
function getImportBindings(
node: Directive | Statement,
): ImportBindings | undefined {
if (node.type === 'ImportDeclaration') {
return {
id: node.source.value,
bindings: node.specifiers.map((s) =>
s.type === 'ImportDefaultSpecifier'
? 'default'
: s.type === 'ImportNamespaceSpecifier'
? '*'
: stringifyModuleExportName(s.imported),
),
locals: node.specifiers.map((s) => s.local.name),
}
}
if (node.type === 'ExportNamedDeclaration') {
if (!node.source) return undefined
return {
id: node.source.value,
bindings: node.specifiers.map((s) => stringifyModuleExportName(s.local)),
locals: [],
}
}
if (node.type === 'ExportAllDeclaration') {
if (!node.source) return undefined
return { id: node.source.value, bindings: ['*'], locals: [] }
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getImportBindings() do?
getImportBindings() is a function in the vite codebase, defined in packages/vite/rolldown.dts.config.ts.
Where is getImportBindings() defined?
getImportBindings() is defined in packages/vite/rolldown.dts.config.ts at line 172.
What does getImportBindings() call?
getImportBindings() calls 1 function(s): stringifyModuleExportName.
What calls getImportBindings()?
getImportBindings() is called by 1 function(s): getAllImportBindings.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free