class HarmonyImportDependency extends ModuleDependency
Extended by HarmonyExportImportedSpecifierDependency.
new HarmonyImportDependency(request, sourceOrder, phase?, attributes?): HarmonyImportDependency
Creates an instance of HarmonyImportDependency.
Source Code: lib/dependencies/HarmonyImportDependency.js#L111DependencyLocationReturns location.
anybooleanImportPhaseTypestringnumberstringbooleanObjectExportPresenceModeExportPresenceModeExportPresenceModeExportPresenceModeHarmonyImportDependency.ExportPresenceModes.fromUserOption(str): ExportPresenceMode
string | falseExportPresenceModeReturns result.
HarmonyImportDependency.ExportPresenceModes.resolveFromOptions(specificValue, options): ExportPresenceMode
Resolve export presence mode from parser options with a specific key and shared fallbacks.
string[][]string[][]HarmonyImportDependency.getNonOptionalPart(members, membersOptionals): string[]
"*""id""local""@"string[][]typeof HarmonyImportDependencyTemplatesymbolstringReturns a dependency category, typical categories are "commonjs", "amd", "esm".
anystringReturns a display name for the type of dependency.
harmonyImportDependency.canConcatenate(): boolean
booleanReturns true if this dependency can be concatenated
harmonyImportDependency.couldAffectReferencingModule(): boolean | symbol
Could affect referencing module.
harmonyImportDependency.createIgnoredModule(context): Module
Creates an ignored module.
harmonyImportDependency.deserialize(__namedParameters): void
ObjectDeserializerContextObjectMiddlewareObject_4Restores this instance from the provided deserializer context.
harmonyImportDependency.getCondition(moduleGraph): false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | null
ModuleGraphfalse | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | nullReturns function to determine if the connection is active.
harmonyImportDependency.getContext(): string | undefined
Returns a request context.
harmonyImportDependency.getErrors(moduleGraph): WebpackError[] | null | undefined
ModuleGraphWebpackError[] | null | undefinedReturns errors.
harmonyImportDependency.getExports(moduleGraph): ExportsSpec | undefined
ModuleGraphExportsSpec | undefinedReturns the exported names
harmonyImportDependency.getForwardId(): string | true | null
Returns the export name this dependency requests from its target module (lazy barrel optimization).
harmonyImportDependency.getImportStatement(update, __namedParameters): [string, string]
Gets import statement.
harmonyImportDependency.getImportVar(moduleGraph): string
ModuleGraphstringReturns name of the variable for the import.
harmonyImportDependency.getLazyName(): string | null
Returns the export name for a LAZY_UNTIL_LOCAL/LAZY_UNTIL_ID classification (lazy barrel optimization).
harmonyImportDependency.getLazyUntil(): "local" | "id" | "*" | "@" | null
"local" | "id" | "*" | "@" | nullReturns how this dependency may be deferred when its parent module is side-effect-free (lazy barrel optimization).
harmonyImportDependency.getLinkingErrors(moduleGraph, ids, additionalMessage): WebpackError[] | undefined
Gets linking errors.
harmonyImportDependency.getModuleEvaluationSideEffectsState(moduleGraph): ConnectionState
ModuleGraphConnectionStateGets module evaluation side effects state.
harmonyImportDependency.getModuleExports(__namedParameters): string
DependencyTemplateContextstringGets module exports.
harmonyImportDependency.getNumberOfIdOccurrences(): number
numberimplement this method to allow the occurrence order plugin to count correctly
harmonyImportDependency.getReference(moduleGraph): never
ModuleGraphneverReturns the referenced module and export
harmonyImportDependency.getReferencedExports(moduleGraph, runtime): (string[] | ReferencedExport)[]
Returns list of exports referenced by this dependency
harmonyImportDependency.getResourceIdentifier(): string | null
Returns an identifier to merge equal requests.
harmonyImportDependency.getWarnings(moduleGraph): WebpackError[] | null | undefined
ModuleGraphWebpackError[] | null | undefinedReturns warnings.
harmonyImportDependency.isLazy(): boolean
booleanWhether the lazy barrel currently defers creating this dependency's target module (lazy barrel optimization).
harmonyImportDependency.serialize(__namedParameters): void
ObjectSerializerContextObjectMiddlewareObject_5Serializes this instance into the provided serializer context.
harmonyImportDependency.setLazy(value): void
booleanSets whether the lazy barrel defers creating this dependency's target module (lazy barrel optimization).
harmonyImportDependency.setLoc(startLine, startColumn, endLine, endColumn): void
Updates loc using the provided start line.
harmonyImportDependency.setLocWithIndex(loc, index): void
numberUpdates 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.
harmonyImportDependency.updateHash(hash, context): void
HashUpdateHashContextDependencyUpdates the hash with the data contributed by this instance.
HarmonyImportDependency.canConcatenate(dependency): boolean
DependencybooleanReturns true if the dependency can be concatenated (scope hoisting).
HarmonyImportDependency.compareLocations(a, b): -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.
HarmonyImportDependency.isLowPriorityDependency(dependency): boolean
DependencybooleanReturns true if the dependency is a low priority dependency.