Home / Type/ SFCDescriptor Type — vue Architecture

SFCDescriptor Type — vue Architecture

Architecture documentation for the SFCDescriptor type/interface in parseComponent.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  12e2cd32_caec_3647_52d2_fbf5316b83b2["SFCDescriptor"]
  0efbfda6_f2a2_633c_6405_ea7a32c8a88d["parseComponent.ts"]
  12e2cd32_caec_3647_52d2_fbf5316b83b2 -->|defined in| 0efbfda6_f2a2_633c_6405_ea7a32c8a88d
  style 12e2cd32_caec_3647_52d2_fbf5316b83b2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/parseComponent.ts lines 45–66

export interface SFCDescriptor {
  source: string
  filename: string
  template: SFCBlock | null
  script: SFCScriptBlock | null
  scriptSetup: SFCScriptBlock | null
  styles: SFCBlock[]
  customBlocks: SFCCustomBlock[]
  cssVars: string[]

  errors: (string | WarningMessage)[]

  /**
   * compare with an existing descriptor to determine whether HMR should perform
   * a reload vs. re-render.
   *
   * Note: this comparison assumes the prev/next script are already identical,
   * and only checks the special case where `<script setup lang="ts">` unused
   * import pruning result changes due to template changes.
   */
  shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean
}

Frequently Asked Questions

What is the SFCDescriptor type?
SFCDescriptor is a type/interface in the vue codebase, defined in packages/compiler-sfc/src/parseComponent.ts.
Where is SFCDescriptor defined?
SFCDescriptor is defined in packages/compiler-sfc/src/parseComponent.ts at line 45.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free