This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { type SFCTemplateBlock } from '@vue/compiler-sfc'; | |
import { NodeTypes, Node, ElementNode, ElementTypes } from '@vue/compiler-core'; | |
// 提取 vue 文件中的组件 | |
export function extractComponents( | |
tpl: SFCTemplateBlock, | |
filter: (name: string) => boolean, | |
) { | |
const list: ElementNode[] = []; | |
if (!tpl) { |