isImportUsed() — vue Function Reference
Architecture documentation for the isImportUsed() function in compileScript.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 5b047687_7011_90aa_7925_63a1d469fe2b["isImportUsed()"] b9f12a63_b611_1b00_0717_3ff21d7ce156["compileScript.ts"] 5b047687_7011_90aa_7925_63a1d469fe2b -->|defined in| b9f12a63_b611_1b00_0717_3ff21d7ce156 6195696d_b4e9_b5d7_3dd5_1966a03d855f["compileScript()"] 6195696d_b4e9_b5d7_3dd5_1966a03d855f -->|calls| 5b047687_7011_90aa_7925_63a1d469fe2b 77a507e4_1c27_8178_ab4a_e01ee29e1b0d["hmrShouldReload()"] 77a507e4_1c27_8178_ab4a_e01ee29e1b0d -->|calls| 5b047687_7011_90aa_7925_63a1d469fe2b 77885a00_badc_8a1d_b8c5_1d9ab042a484["resolveTemplateUsageCheckString()"] 5b047687_7011_90aa_7925_63a1d469fe2b -->|calls| 77885a00_badc_8a1d_b8c5_1d9ab042a484 style 5b047687_7011_90aa_7925_63a1d469fe2b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/compiler-sfc/src/compileScript.ts lines 1879–1889
function isImportUsed(
local: string,
sfc: SFCDescriptor,
isTS: boolean
): boolean {
return new RegExp(
// #4274 escape $ since it's a special char in regex
// (and is the only regex special char that is valid in identifiers)
`[^\\w$_]${local.replace(/\$/g, '\\$')}[^\\w$_]`
).test(resolveTemplateUsageCheckString(sfc, isTS))
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does isImportUsed() do?
isImportUsed() is a function in the vue codebase, defined in packages/compiler-sfc/src/compileScript.ts.
Where is isImportUsed() defined?
isImportUsed() is defined in packages/compiler-sfc/src/compileScript.ts at line 1879.
What does isImportUsed() call?
isImportUsed() calls 1 function(s): resolveTemplateUsageCheckString.
What calls isImportUsed()?
isImportUsed() is called by 2 function(s): compileScript, hmrShouldReload.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free