On this page

class webpack.HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency
new HarmonyExportImportedSpecifierDependency(request, sourceOrder, phase?, attributes?): HarmonyExportImportedSpecifierDependency
Attributes
request:string
sourceOrder:number
phase:0 | 2 | 1
attributes:Record<string, string>

Creates an instance of HarmonyImportDependency.

Attributes
activeExports:Set<string>
allStarExports:HarmonyStarExportsList | null
attributes:Record<string, string>
category:string
Returns a dependency category, typical categories are "commonjs", "amd", "esm".
disconnect:any
exportPresenceMode:ExportPresenceMode
id:void
Returns id.
ids:string[]
Returns location.
module:any
name:string | null
optional:boolean
otherStarExports:readonly HarmonyExportImportedSpecifierDependency[] | null
range:[number, number]
request:string
sourceOrder:number
type:string
Returns a display name for the type of dependency.
userRequest:string
weak:boolean
ExportPresenceModes:{ AUTO: ExportPresenceMode; ERROR: ExportPresenceMode; NONE: ExportPresenceMode; WARN: ExportPresenceMode; fromUserOption: any; resolveFromOptions: any }
EXPORTS_OBJECT_REFERENCED:string[][]
EXPORTS_OBJECT_REFERENCED_MANGLEABLE:string[][]
getNonOptionalPart:(members: string[], membersOptionals: boolean[]) => string[]
Get the non-optional leading part of a member chain.
LAZY_UNTIL_FALLBACK:"*"
LAZY_UNTIL_ID:"id"
LAZY_UNTIL_LOCAL:"local"
Lazy barrel classification of a dependency within a side-effect-free module. LAZY_UNTIL_LOCAL : locally provided export name ( getLazyName ), requesting it requires no dependency. LAZY_UNTIL_ID : named re-export ( getLazyName ) deferred until the export name is requested. LAZY_UNTIL_FALLBACK : star re-export, deferred until an unknown name or all names are requested. LAZY_UNTIL_REQUEST : deferred together with other dependencies of the same request.
LAZY_UNTIL_REQUEST:"@"
NO_EXPORTS_REFERENCED:string[][]
TRANSITIVE:symbol
canConcatenate(): boolean
Returns:boolean

Returns true if this dependency can be concatenated


couldAffectReferencingModule(): boolean | symbol
Returns:boolean | symbol

Could affect referencing module.


createIgnoredModule(context): Module
Attributes
context:string
Returns:Module

Creates an ignored module.


deserialize(objectDeserializerContextObjectMiddlewareObject_4): void
Attributes
objectDeserializerContextObjectMiddlewareObject_4:ObjectDeserializerContextObjectMiddlewareObject_4
Returns:void

Restores this instance from the provided deserializer context.


getCondition(moduleGraph): false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | null
Attributes
moduleGraph:ModuleGraph
Returns:false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | null

Returns function to determine if the connection is active.


getContext(): string | undefined
Returns:string | undefined

Returns a request context.


getErrors(moduleGraph): WebpackError[] | null | undefined
Attributes
moduleGraph:ModuleGraph
Returns:WebpackError[] | null | undefined

Returns errors.


getExports(moduleGraph): ExportsSpec | undefined
Attributes
moduleGraph:ModuleGraph

Returns the exported names


getForwardId(): string | true | null
Returns:string | true | null

Returns the export name this dependency requests from its target module (lazy barrel optimization).


getId(): void
Stability: 0Deprecated
Returns:void

Returns id.


getIds(moduleGraph): string[]
Attributes
moduleGraph:ModuleGraph
Returns:string[]

Returns the imported id.


getImportStatement(update, dependencyTemplateContext): [string, string]
Attributes
update:boolean
dependencyTemplateContext:DependencyTemplateContext
Returns:[string, string]

Gets import statement.


getImportVar(moduleGraph): string
Attributes
moduleGraph:ModuleGraph
Returns:string

Returns name of the variable for the import.


getLazyName(): string | null
Returns:string | null

Returns the export name for a LAZY_UNTIL_LOCAL/LAZY_UNTIL_ID classification (lazy barrel optimization).


getLazyUntil(): "local" | "id" | "*" | "@" | null
Returns:"local" | "id" | "*" | "@" | null

Returns how this dependency may be deferred when its parent module is side-effect-free (lazy barrel optimization).


getLinkingErrors(moduleGraph, ids, additionalMessage): WebpackError[] | undefined
Attributes
moduleGraph:ModuleGraph
ids:string[]
additionalMessage:string

Gets linking errors.


getMode(moduleGraph, runtime): ExportMode
Attributes
moduleGraph:ModuleGraph
runtime:RuntimeSpec
Returns:ExportMode

Returns the export mode.


getModuleEvaluationSideEffectsState(moduleGraph): ConnectionState
Attributes
moduleGraph:ModuleGraph

Gets module evaluation side effects state.


getModuleExports(dependencyTemplateContext): string
Attributes
dependencyTemplateContext:DependencyTemplateContext
Returns:string

Gets module exports.


getNumberOfIdOccurrences(): number
Returns:number

implement this method to allow the occurrence order plugin to count correctly


getReference(moduleGraph): never
Stability: 0Deprecated
Attributes
moduleGraph:ModuleGraph
Returns:never

Returns the referenced module and export


getReferencedExports(moduleGraph, runtime): (string[] | ReferencedExport)[]
Attributes
moduleGraph:ModuleGraph
runtime:RuntimeSpec
Returns:(string[] | ReferencedExport)[]

Returns list of exports referenced by this dependency


getResourceIdentifier(): string | null
Returns:string | null

Returns an identifier to merge equal requests.


getStarReexports(moduleGraph, runtime, exportsInfo?, importedModule?): { checked?: Set<string>; exports?: Set<string>; hidden?: Set<string>; ignoredExports: Set<string> }
Attributes
moduleGraph:ModuleGraph
runtime:RuntimeSpec
exportsInfo:ExportsInfo
importedModule:Module
Returns:{ checked?: Set<string>; exports?: Set<string>; hidden?: Set<string>; ignoredExports: Set<string> }

Gets star reexports.


getWarnings(moduleGraph): WebpackError[] | null | undefined
Attributes
moduleGraph:ModuleGraph
Returns:WebpackError[] | null | undefined

Returns warnings.


isLazy(): boolean
Returns:boolean

Whether the lazy barrel currently defers creating this dependency's target module (lazy barrel optimization).


serialize(objectSerializerContextObjectMiddlewareObject_5): void
Attributes
objectSerializerContextObjectMiddlewareObject_5:ObjectSerializerContextObjectMiddlewareObject_5
Returns:void

Serializes this instance into the provided serializer context.


setId(): void
Stability: 0Deprecated
Returns:void

Updates id.


setIds(moduleGraph, ids): void
Attributes
moduleGraph:ModuleGraph
ids:string[]
Returns:void

Updates ids using the provided module graph.


setLazy(value): void
Attributes
value:boolean
Returns:void

Sets whether the lazy barrel defers creating this dependency's target module (lazy barrel optimization).


setLoc(startLine, startColumn, endLine, endColumn): void
Attributes
startLine:number
startColumn:number
endLine:number
endColumn:number
Returns:void

Updates loc using the provided start line.


setLocWithIndex(loc, index): void
Attributes

Updates loc from a source location plus an explicit index, without materializing the loc object (keeps get loc lazy). Replaces the dep.loc = Object.create(loc); dep.loc.index = i pattern, which both allocated a copy and stored the index outside the serialized fields.


updateHash(hash, context): void
Attributes

Updates the hash with the data contributed by this instance.


Attributes
dependency:Dependency
Returns:boolean

Returns true if the dependency can be concatenated (scope hoisting).


Attributes
Returns:-1 | 0 | 1

Compares two dependencies by source location for sorting a module's dependencies, without materializing the loc objects (get loc caches its result, so comparing through it would retain a location object on every sorted dependency). These dependencies always carry a real source position, so only start (line, column) and the within-statement index are compared; a dependency without an index sorts after one that has an index at the same position.


Attributes
dependency:Dependency
Returns:boolean

Returns true if the dependency is a low priority dependency.