function resolveSFCs (dirs) {
  return dirs
    .map((layoutDir) =>
      (fs.existsSync(layoutDir)
        ? globby.sync('**/*.vue', { cwd: layoutDir, absolute: false })
        : []
      )
        .map((filename) => {
          const componentName = getComponentName(filename)
          return {
            filename,
            componentName,
            isInternal: isInternal(componentName),
            path: resolve(layoutDir, filename)
          }
        })
    )
    .reduce((arr, next) => {
      arr.push(...next)
      return arr
    }, [])
    .reduce((map, component) => {
      map[component.componentName] = component
      return map
    }, {})
}
Resolve Vue SFCs, return a Map

@param dirs
@returns {*}