Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ModuleGraph

Index

Constructors

Properties

fileToModulesMap: Map<string, Set<ModuleNode>>
idToModuleMap: Map<string, ModuleNode>
safeModulesPath: Set<string>
urlToModuleMap: Map<string, ModuleNode>

Methods

  • Parameters

    • file: string

    Returns ModuleNode

  • ensureEntryFromUrl(rawUrl: string, ssr?: boolean, setIsSelfAccepting?: boolean): Promise<ModuleNode>
  • Parameters

    • rawUrl: string
    • Optional ssr: boolean
    • Optional setIsSelfAccepting: boolean

    Returns Promise<ModuleNode>

  • Parameters

    • id: string

    Returns undefined | ModuleNode

  • getModuleByUrl(rawUrl: string, ssr?: boolean): Promise<undefined | ModuleNode>
  • Parameters

    • rawUrl: string
    • Optional ssr: boolean

    Returns Promise<undefined | ModuleNode>

  • getModulesByFile(file: string): undefined | Set<ModuleNode>
  • Parameters

    • file: string

    Returns undefined | Set<ModuleNode>

  • invalidateAll(): void
  • Returns void

  • invalidateModule(mod: ModuleNode, seen?: Set<ModuleNode>, timestamp?: number, isHmr?: boolean): void
  • Parameters

    Returns void

  • onFileChange(file: string): void
  • Parameters

    • file: string

    Returns void

  • resolveUrl(url: string, ssr?: boolean): Promise<ResolvedUrl>
  • Parameters

    • url: string
    • Optional ssr: boolean

    Returns Promise<ResolvedUrl>

  • updateModuleInfo(mod: ModuleNode, importedModules: Set<string | ModuleNode>, importedBindings: null | Map<string, Set<string>>, acceptedModules: Set<string | ModuleNode>, acceptedExports: null | Set<string>, isSelfAccepting: boolean, ssr?: boolean): Promise<undefined | Set<ModuleNode>>
  • Update the module graph based on a module's updated imports information If there are dependencies that no longer have any importers, they are returned as a Set.

    Parameters

    • mod: ModuleNode
    • importedModules: Set<string | ModuleNode>
    • importedBindings: null | Map<string, Set<string>>
    • acceptedModules: Set<string | ModuleNode>
    • acceptedExports: null | Set<string>
    • isSelfAccepting: boolean
    • Optional ssr: boolean

    Returns Promise<undefined | Set<ModuleNode>>