MCPcopy
hub / github.com/vuejs/core / genImports

Function genImports

packages/compiler-core/src/codegen.ts:587–597  ·  view source on GitHub ↗
(importsOptions: ImportItem[], context: CodegenContext)

Source from the content-addressed store, hash-verified

585}
586
587function genImports(importsOptions: ImportItem[], context: CodegenContext) {
588 if (!importsOptions.length) {
589 return
590 }
591 importsOptions.forEach(imports => {
592 context.push(`import `)
593 genNode(imports.exp, context)
594 context.push(` from '${imports.path}'`)
595 context.newline()
596 })
597}
598
599function isText(n: string | CodegenNode) {
600 return (

Callers 1

genModulePreambleFunction · 0.85

Calls 4

genNodeFunction · 0.85
forEachMethod · 0.80
newlineMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected