class EntryDependency extends ModuleDependency
new EntryDependency(request, sourceOrder?): EntryDependency
Creates an instance of ModuleDependency.
Source Code: lib/Dependency.js#L172DependencyLocationReturns location.
anybooleanstringnumberstringbooleanstring[][]string[][]"*""id""local""@"string[][]typeof DependencyTemplatesymbolstringReturns a dependency category, typical categories are "commonjs", "amd", "esm".
anystringReturns a display name for the type of dependency.
entryDependency.canConcatenate(): boolean
booleanReturns true if this dependency can be concatenated
entryDependency.couldAffectReferencingModule(): boolean | symbol
Could affect referencing module.
entryDependency.createIgnoredModule(context): Module
Creates an ignored module.
entryDependency.deserialize(__namedParameters): void
ObjectDeserializerContextObjectMiddlewareObject_4Restores this instance from the provided deserializer context.
entryDependency.getCondition(moduleGraph): false | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | null
ModuleGraphfalse | ((moduleGraphConnection: ModuleGraphConnection, runtime: RuntimeSpec) => ConnectionState) | nullReturns function to determine if the connection is active.
entryDependency.getContext(): string | undefined
Returns a request context.
entryDependency.getErrors(moduleGraph): WebpackError[] | null | undefined
ModuleGraphWebpackError[] | null | undefinedReturns errors.
entryDependency.getExports(moduleGraph): ExportsSpec | undefined
ModuleGraphExportsSpec | undefinedReturns the exported names
entryDependency.getForwardId(): string | true | null
Returns the export name this dependency requests from its target module (lazy barrel optimization).
entryDependency.getLazyName(): string | null
Returns the export name for a LAZY_UNTIL_LOCAL/LAZY_UNTIL_ID classification (lazy barrel optimization).
entryDependency.getLazyUntil(): "local" | "id" | "*" | "@" | null
"local" | "id" | "*" | "@" | nullReturns how this dependency may be deferred when its parent module is side-effect-free (lazy barrel optimization).
entryDependency.getModuleEvaluationSideEffectsState(moduleGraph): ConnectionState
ModuleGraphConnectionStateGets module evaluation side effects state.
entryDependency.getNumberOfIdOccurrences(): number
numberimplement this method to allow the occurrence order plugin to count correctly
entryDependency.getReference(moduleGraph): never
ModuleGraphneverReturns the referenced module and export
entryDependency.getReferencedExports(moduleGraph, runtime): (string[] | ReferencedExport)[]
Returns list of exports referenced by this dependency
entryDependency.getResourceIdentifier(): string | null
Returns an identifier to merge equal requests.
entryDependency.getWarnings(moduleGraph): WebpackError[] | null | undefined
ModuleGraphWebpackError[] | null | undefinedReturns warnings.
entryDependency.isLazy(): boolean
booleanWhether the lazy barrel currently defers creating this dependency's target module (lazy barrel optimization).
entryDependency.serialize(__namedParameters): void
ObjectSerializerContextObjectMiddlewareObject_5Serializes this instance into the provided serializer context.
entryDependency.setLazy(value): void
booleanSets whether the lazy barrel defers creating this dependency's target module (lazy barrel optimization).
entryDependency.setLoc(startLine, startColumn, endLine, endColumn): void
Updates loc using the provided start line.
entryDependency.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.
entryDependency.updateHash(hash, context): void
HashUpdateHashContextDependencyUpdates the hash with the data contributed by this instance.
EntryDependency.canConcatenate(dependency): boolean
DependencybooleanReturns true if the dependency can be concatenated (scope hoisting).
EntryDependency.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.
EntryDependency.isLowPriorityDependency(dependency): boolean
DependencybooleanReturns true if the dependency is a low priority dependency.