- {ModuleDependency}
new HarmonyImportDependency(request, sourceOrder, phase?, attributes?): HarmonyImportDependencyAttributes
Returns:
{HarmonyImportDependency}
attributes{ImportAttributes}category<string>disconnect<any>loc{DependencyLocation}module<any>optional<boolean>phase{ImportPhaseType}range{Tuple<number, number>}request<string>sourceOrder<number>type<string>userRequest<string>weak<boolean>ExportPresenceModes<object>EXPORTS_OBJECT_REFERENCED{string[][]}getNonOptionalPart<object>Get the non-optional leading part of a member chain.NO_EXPORTS_REFERENCED{string[][]}Template{HarmonyImportDependencyTemplate}TRANSITIVE<symbol>
webpack.dependencies.HarmonyImportDependency.couldAffectReferencingModule(): boolean | symboltrue, when changes to the referenced module could affect the referencing module; TRANSITIVE, when changes to the referenced module could affect referencing modules of the referencing module
webpack.dependencies.HarmonyImportDependency.createIgnoredModule(context): ModuleAttributes
context:
<string>context directory
Returns:
{Module} ignored module
webpack.dependencies.HarmonyImportDependency.deserialize(__namedParameters): void__namedParameters{ObjectDeserializerContext} context- Returns: {void}
webpack.dependencies.HarmonyImportDependency.getCondition(moduleGraph): voidmoduleGraph{ModuleGraph} module graph- Returns:
<object>function to determine if the connection is active
webpack.dependencies.HarmonyImportDependency.getContext(): stringReturns:
<string>a request context
webpack.dependencies.HarmonyImportDependency.getErrors(moduleGraph): voidmoduleGraph{ModuleGraph}- Returns: {WebpackError[]}
Returns errors
webpack.dependencies.HarmonyImportDependency.getExports(moduleGraph): voidmoduleGraph{ModuleGraph}- Returns: {ExportsSpec}
Returns the exported names
webpack.dependencies.HarmonyImportDependency.getImportStatement(update, __namedParameters): Tuple<string, string>Attributes
update:
<boolean>create new variables or update existing one
__namedParameters:
{DependencyTemplateContext}
Returns:
{Tuple<string, string>} the import statement and the compat statement
webpack.dependencies.HarmonyImportDependency.getImportVar(moduleGraph): voidmoduleGraph{ModuleGraph} the module graph- Returns:
<string>name of the variable for the import
webpack.dependencies.HarmonyImportDependency.getLinkingErrors(moduleGraph, ids, additionalMessage): voidmoduleGraph{ModuleGraph} module graphids<string[]>imported idsadditionalMessage<string>extra info included in the error message- Returns: {WebpackError[]} errors
webpack.dependencies.HarmonyImportDependency.getModuleEvaluationSideEffectsState(moduleGraph): voidmoduleGraph{ModuleGraph} the module graph- Returns: {ConnectionState} how this dependency connects the module to referencing modules
webpack.dependencies.HarmonyImportDependency.getModuleExports(__namedParameters): void__namedParameters{DependencyTemplateContext} the template context- Returns:
<string>the expression
webpack.dependencies.HarmonyImportDependency.getNumberOfIdOccurrences(): numberReturns:
<number>implement this method to allow the occurrence order plugin to count correctly
webpack.dependencies.HarmonyImportDependency.getReference(moduleGraph): voidStability: 0Deprecated
moduleGraph{ModuleGraph}- Returns: {never}
Returns the referenced module and export
webpack.dependencies.HarmonyImportDependency.getReferencedExports(moduleGraph, runtime): voidmoduleGraph{ModuleGraph} module graphruntime{RuntimeSpec} the runtime for which the module is analysed- Returns:
<string[]>referenced exports
Returns list of exports referenced by this dependency
webpack.dependencies.HarmonyImportDependency.getResourceIdentifier(): stringReturns:
<string>an identifier to merge equal requests
webpack.dependencies.HarmonyImportDependency.getWarnings(moduleGraph): voidmoduleGraph{ModuleGraph}- Returns: {WebpackError[]}
Returns warnings
webpack.dependencies.HarmonyImportDependency.serialize(__namedParameters): void__namedParameters{ObjectSerializerContext} context- Returns: {void}
webpack.dependencies.HarmonyImportDependency.setLoc(startLine, startColumn, endLine, endColumn): voidAttributes
Returns:
{void}
webpack.dependencies.HarmonyImportDependency.updateHash(hash, context): voidhash{Hash}context{UpdateHashContextDependency}- Returns: {void}
Update the hash
webpack.dependencies.HarmonyImportDependency.isLowPriorityDependency(dependency): voiddependency{Dependency} dep- Returns:
<boolean>true if the dependency is a low priority dependency