Skip to main content
webpack / ExternalModule

Class: ExternalModule

Defined in: webpack/types.d.ts:5683

Extends

Constructors

Constructor

new ExternalModule(request, type, userRequest, dependencyMeta?): ExternalModule
Defined in: webpack/types.d.ts:5684

Parameters

request
ExternalModuleRequest
type
ExternalsType
userRequest
string
dependencyMeta?
AssetDependencyMeta | CssImportDependencyMeta | ImportDependencyMeta

Returns

ExternalModule

Overrides

Module.constructor

Properties

blocks

blocks: AsyncDependenciesBlock[]
Defined in: webpack/types.d.ts:4110

Inherited from

Module.blocks

buildInfo?

optional buildInfo: BuildInfo
Defined in: webpack/types.d.ts:10642

Inherited from

Module.buildInfo

buildMeta?

optional buildMeta: BuildMeta
Defined in: webpack/types.d.ts:10641

Inherited from

Module.buildMeta

codeGenerationDependencies?

optional codeGenerationDependencies: Dependency[]
Defined in: webpack/types.d.ts:10644

Inherited from

Module.codeGenerationDependencies

context

context: string
Defined in: webpack/types.d.ts:10632

Inherited from

ModuleChunkLoadingRuntimeModule.context

debugId

debugId: number
Defined in: webpack/types.d.ts:10635

Inherited from

Module.debugId

dependencies

dependencies: Dependency[]
Defined in: webpack/types.d.ts:4109

Inherited from

Module.dependencies

dependencyMeta?

optional dependencyMeta: AssetDependencyMeta | CssImportDependencyMeta | ImportDependencyMeta
Defined in: webpack/types.d.ts:5696

depth

depth: number
Defined in: webpack/types.d.ts:10655

Inherited from

ModuleChunkLoadingRuntimeModule.depth

externalType

externalType: ExternalsType
Defined in: webpack/types.d.ts:5694

factoryMeta?

optional factoryMeta: FactoryMeta
Defined in: webpack/types.d.ts:10637

Inherited from

Module.factoryMeta

hot

hot: boolean
Defined in: webpack/types.d.ts:10640

Inherited from

Module.hot

id

id: string | number
Defined in: webpack/types.d.ts:10649

Deprecated

Inherited from

ModuleChunkLoadingRuntimeModule.id

index

index: number
Defined in: webpack/types.d.ts:10653

Inherited from

ModuleChunkLoadingRuntimeModule.index

index2

index2: number
Defined in: webpack/types.d.ts:10654

Inherited from

ModuleChunkLoadingRuntimeModule.index2

issuer?

optional issuer: Module
Defined in: webpack/types.d.ts:10656

Inherited from

ModuleChunkLoadingRuntimeModule.issuer

layer

layer: string
Defined in: webpack/types.d.ts:10633

Inherited from

ModuleChunkLoadingRuntimeModule.layer

needId

needId: boolean
Defined in: webpack/types.d.ts:10634

Inherited from

Module.needId

parent?

optional parent: DependenciesBlock
Defined in: webpack/types.d.ts:4111

Inherited from

Module.parent

presentationalDependencies?

optional presentationalDependencies: Dependency[]
Defined in: webpack/types.d.ts:10643

Inherited from

Module.presentationalDependencies

profile?

optional profile: ModuleProfile
Defined in: webpack/types.d.ts:10652

Inherited from

Module.profile

request

request: ExternalModuleRequest
Defined in: webpack/types.d.ts:5693

resolveOptions?

optional resolveOptions: ResolveOptions
Defined in: webpack/types.d.ts:10636

Inherited from

Module.resolveOptions

type

type: string
Defined in: webpack/types.d.ts:10631

Inherited from

Module.type

used

used: any
Defined in: webpack/types.d.ts:10790

Inherited from

Module.used

userRequest

userRequest: string
Defined in: webpack/types.d.ts:5695

useSimpleSourceMap

useSimpleSourceMap: boolean
Defined in: webpack/types.d.ts:10639

Inherited from

Module.useSimpleSourceMap

useSourceMap

useSourceMap: boolean
Defined in: webpack/types.d.ts:10638

Inherited from

Module.useSourceMap

getExternalModuleNodeCommonjsInitFragment()

static getExternalModuleNodeCommonjsInitFragment: (runtimeTemplate) => InitFragment<ChunkRenderContextJavascriptModulesPlugin>
Defined in: webpack/types.d.ts:5709

Parameters

runtimeTemplate
RuntimeTemplate

Returns

InitFragment<ChunkRenderContextJavascriptModulesPlugin>

ModuleExternalInitFragment

static ModuleExternalInitFragment: typeof ModuleExternalInitFragment
Defined in: webpack/types.d.ts:5708

Accessors

chunksIterable

Get Signature

get chunksIterable(): Iterable<Chunk>
Defined in: webpack/types.d.ts:10673
Returns
Iterable<Chunk>

Inherited from

Module.chunksIterable

errors

Get Signature

get errors(): any
Defined in: webpack/types.d.ts:10788
Returns
any

Inherited from

Module.errors

exportsArgument

Get Signature

get exportsArgument(): string
Defined in: webpack/types.d.ts:10675
Returns
string

Inherited from

Module.exportsArgument

hasEqualsChunks

Get Signature

get hasEqualsChunks(): any
Defined in: webpack/types.d.ts:10786
Returns
any

Inherited from

Module.hasEqualsChunks

hash

Get Signature

get hash(): string
Defined in: webpack/types.d.ts:10650
Returns
string

Inherited from

Module.hash

isUsed

Get Signature

get isUsed(): any
Defined in: webpack/types.d.ts:10787
Returns
any

Inherited from

Module.isUsed

moduleArgument

Get Signature

get moduleArgument(): string
Defined in: webpack/types.d.ts:10676
Returns
string

Inherited from

Module.moduleArgument

optimizationBailout

Get Signature

get optimizationBailout(): (string | (requestShortener) => string)[]
Defined in: webpack/types.d.ts:10662
Deprecated
Returns
(string | (requestShortener) => string)[]

Inherited from

Module.optimizationBailout

optional

Get Signature

get optional(): boolean
Defined in: webpack/types.d.ts:10666
Returns
boolean

Inherited from

Module.optional

renderedHash

Get Signature

get renderedHash(): string
Defined in: webpack/types.d.ts:10651
Returns
string

Inherited from

Module.renderedHash

usedExports

Get Signature

get usedExports(): boolean | SortableSet<string>
Defined in: webpack/types.d.ts:10657
Returns
boolean | SortableSet<string>

Inherited from

ModuleChunkLoadingRuntimeModule.usedExports

warnings

Get Signature

get warnings(): any
Defined in: webpack/types.d.ts:10789
Returns
any

Inherited from

Module.warnings

Methods

addBlock()

addBlock(block): void
Defined in: webpack/types.d.ts:4118 Adds a DependencyBlock to DependencyBlock relationship. This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting)

Parameters

block
AsyncDependenciesBlock

Returns

void

Inherited from

Module.addBlock

addCacheDependencies()

addCacheDependencies(fileDependencies, contextDependencies, missingDependencies, buildDependencies): void
Defined in: webpack/types.d.ts:10780

Parameters

fileDependencies
LazySet<string>
contextDependencies
LazySet<string>
missingDependencies
LazySet<string>
buildDependencies
LazySet<string>

Returns

void

Inherited from

Module.addCacheDependencies

addChunk()

addChunk(chunk): boolean
Defined in: webpack/types.d.ts:10667

Parameters

chunk
Chunk

Returns

boolean

Inherited from

Module.addChunk

addCodeGenerationDependency()

addCodeGenerationDependency(codeGenerationDependency): void
Defined in: webpack/types.d.ts:10679

Parameters

codeGenerationDependency
Dependency

Returns

void

Inherited from

Module.addCodeGenerationDependency

addDependency()

addDependency(dependency): void
Defined in: webpack/types.d.ts:4119

Parameters

dependency
Dependency

Returns

void

Inherited from

Module.addDependency

addError()

addError(error): void
Defined in: webpack/types.d.ts:10683

Parameters

error
WebpackError

Returns

void

Inherited from

Module.addError

addPresentationalDependency()

addPresentationalDependency(presentationalDependency): void
Defined in: webpack/types.d.ts:10678

Parameters

presentationalDependency
Dependency

Returns

void

Inherited from

Module.addPresentationalDependency

addWarning()

addWarning(warning): void
Defined in: webpack/types.d.ts:10680

Parameters

warning
WebpackError

Returns

void

Inherited from

Module.addWarning

build()

build(options, compilation, resolver, fs, callback): void
Defined in: webpack/types.d.ts:10724

Parameters

options
WebpackOptionsNormalizedWithDefaults
compilation
Compilation
resolver
ResolverWithOptions
fs
InputFileSystem
callback
(err?) => void

Returns

void

Inherited from

Module.build

chunkCondition()

chunkCondition(chunk, compilation): boolean
Defined in: webpack/types.d.ts:10759

Parameters

chunk
Chunk
compilation
Compilation

Returns

boolean

Inherited from

Module.chunkCondition

cleanupForCache()

cleanupForCache(): void
Defined in: webpack/types.d.ts:10778 Assuming this module is in the cache. Remove internal references to allow freeing some memory.

Returns

void

Inherited from

Module.cleanupForCache

clearDependenciesAndBlocks()

clearDependenciesAndBlocks(): void
Defined in: webpack/types.d.ts:4125 Removes all dependencies and blocks

Returns

void

Inherited from

Module.clearDependenciesAndBlocks

clearWarningsAndErrors()

clearWarningsAndErrors(): void
Defined in: webpack/types.d.ts:10690 removes all warnings and errors

Returns

void

Inherited from

Module.clearWarningsAndErrors

codeGeneration()

codeGeneration(context): CodeGenerationResult
Defined in: webpack/types.d.ts:10758

Parameters

context
CodeGenerationContext

Returns

CodeGenerationResult

Inherited from

Module.codeGeneration

deserialize()

deserialize(__namedParameters): void
Defined in: webpack/types.d.ts:4128

Parameters

__namedParameters
ObjectDeserializerContext

Returns

void

Inherited from

Module.deserialize

getChunks()

getChunks(): Chunk[]
Defined in: webpack/types.d.ts:10671

Returns

Chunk[]

Inherited from

Module.getChunks

getConcatenationBailoutReason()

getConcatenationBailoutReason(context): string
Defined in: webpack/types.d.ts:10754

Parameters

context
ConcatenationBailoutReasonContext

Returns

string

Inherited from

Module.getConcatenationBailoutReason

getErrors()

getErrors(): Iterable<WebpackError, any, any>
Defined in: webpack/types.d.ts:10684

Returns

Iterable<WebpackError, any, any>

Inherited from

Module.getErrors

getExportsType()

getExportsType(moduleGraph, strict?): ExportsType
Defined in: webpack/types.d.ts:10677

Parameters

moduleGraph
ModuleGraph
strict?
boolean

Returns

ExportsType

Inherited from

Module.getExportsType

getNumberOfChunks()

getNumberOfChunks(): number
Defined in: webpack/types.d.ts:10672

Returns

number

Inherited from

Module.getNumberOfChunks

getNumberOfErrors()

getNumberOfErrors(): number
Defined in: webpack/types.d.ts:10685

Returns

number

Inherited from

Module.getNumberOfErrors

getNumberOfWarnings()

getNumberOfWarnings(): number
Defined in: webpack/types.d.ts:10682

Returns

number

Inherited from

Module.getNumberOfWarnings

getRootBlock()

getRootBlock(): DependenciesBlock
Defined in: webpack/types.d.ts:4112

Returns

DependenciesBlock

Inherited from

Module.getRootBlock

getSideEffectsConnectionState()

getSideEffectsConnectionState(moduleGraph): ConnectionState
Defined in: webpack/types.d.ts:10757

Parameters

moduleGraph
ModuleGraph

Returns

ConnectionState

Inherited from

Module.getSideEffectsConnectionState

getSourceBasicTypes()

getSourceBasicTypes(): ReadonlySet<string>
Defined in: webpack/types.d.ts:10740 Basic source types are high-level categories like javascript, css, webassembly, etc. We only have built-in knowledge about the javascript basic type here; other basic types may be added or changed over time by generators and do not need to be handled or detected here. Some modules, e.g. RemoteModule, may return non-basic source types like “remote” and “share-init” from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.

Returns

ReadonlySet<string>

Inherited from

Module.getSourceBasicTypes

getSourceTypes()

getSourceTypes(): ReadonlySet<string>
Defined in: webpack/types.d.ts:10731

Returns

ReadonlySet<string>

Inherited from

Module.getSourceTypes

getUnsafeCacheData()

getUnsafeCacheData(): UnsafeCacheData
Defined in: webpack/types.d.ts:10773 Module should be unsafe cached. Get data that’s needed for that. This data will be passed to restoreFromUnsafeCache later.

Returns

UnsafeCacheData

Inherited from

Module.getUnsafeCacheData

getWarnings()

getWarnings(): Iterable<WebpackError, any, any>
Defined in: webpack/types.d.ts:10681

Returns

Iterable<WebpackError, any, any>

Inherited from

Module.getWarnings

hasChunkCondition()

hasChunkCondition(): boolean
Defined in: webpack/types.d.ts:10760

Returns

boolean

Inherited from

Module.hasChunkCondition

hasReasonForChunk()

hasReasonForChunk(chunk, moduleGraph, chunkGraph): boolean
Defined in: webpack/types.d.ts:10702

Parameters

chunk
Chunk
moduleGraph
ModuleGraph
chunkGraph
ChunkGraph

Returns

boolean

Inherited from

Module.hasReasonForChunk

hasReasons()

hasReasons(moduleGraph, runtime): boolean
Defined in: webpack/types.d.ts:10707

Parameters

moduleGraph
ModuleGraph
runtime
RuntimeSpec

Returns

boolean

Inherited from

Module.hasReasons

identifier()

identifier(): string
Defined in: webpack/types.d.ts:10722

Returns

string

Inherited from

Module.identifier

invalidateBuild()

invalidateBuild(): void
Defined in: webpack/types.d.ts:10721

Returns

void

Inherited from

Module.invalidateBuild

isAccessibleInChunk()

isAccessibleInChunk(chunkGraph, chunk, ignoreChunk?): boolean
Defined in: webpack/types.d.ts:10692

Parameters

chunkGraph
ChunkGraph
chunk
Chunk
ignoreChunk?
Chunk

Returns

boolean

Inherited from

Module.isAccessibleInChunk

isAccessibleInChunkGroup()

isAccessibleInChunkGroup(chunkGraph, chunkGroup, ignoreChunk?): boolean
Defined in: webpack/types.d.ts:10697

Parameters

chunkGraph
ChunkGraph
chunkGroup
ChunkGroup
ignoreChunk?
Chunk

Returns

boolean

Inherited from

Module.isAccessibleInChunkGroup

isEntryModule()

isEntryModule(): boolean
Defined in: webpack/types.d.ts:10670

Returns

boolean

Inherited from

Module.isEntryModule

isInChunk()

isInChunk(chunk): boolean
Defined in: webpack/types.d.ts:10669

Parameters

chunk
Chunk

Returns

boolean

Inherited from

Module.isInChunk

isOptional()

isOptional(moduleGraph): boolean
Defined in: webpack/types.d.ts:10691

Parameters

moduleGraph
ModuleGraph

Returns

boolean

Inherited from

Module.isOptional

isProvided()

isProvided(exportName): boolean
Defined in: webpack/types.d.ts:10674

Parameters

exportName
string

Returns

boolean

Inherited from

Module.isProvided

libIdent()

libIdent(options): string
Defined in: webpack/types.d.ts:10752

Parameters

options
LibIdentOptions

Returns

string

Inherited from

Module.libIdent

nameForCondition()

nameForCondition(): string
Defined in: webpack/types.d.ts:10753

Returns

string

Inherited from

Module.nameForCondition

needBuild()

needBuild(context, callback): void
Defined in: webpack/types.d.ts:10708

Parameters

context
NeedBuildContext
callback
(err?, needBuild?) => void

Returns

void

Inherited from

Module.needBuild

needRebuild()

needRebuild(fileTimestamps, contextTimestamps): boolean
Defined in: webpack/types.d.ts:10717 Use needBuild instead

Parameters

fileTimestamps
Map<string, number>
contextTimestamps
Map<string, number>

Returns

boolean

Deprecated

Inherited from

Module.needRebuild

originalSource()

originalSource(): Source
Defined in: webpack/types.d.ts:10779

Returns

Source

Inherited from

Module.originalSource

readableIdentifier()

readableIdentifier(requestShortener): string
Defined in: webpack/types.d.ts:10723

Parameters

requestShortener
RequestShortener

Returns

string

Inherited from

Module.readableIdentifier

removeChunk()

removeChunk(chunk): void
Defined in: webpack/types.d.ts:10668

Parameters

chunk
Chunk

Returns

void

Inherited from

Module.removeChunk

removeDependency()

removeDependency(dependency): void
Defined in: webpack/types.d.ts:4120

Parameters

dependency
Dependency

Returns

void

Inherited from

Module.removeDependency

restoreFromUnsafeCache()

restoreFromUnsafeCache(unsafeCacheData, normalModuleFactory): void
Defined in: webpack/types.d.ts:5704 restore unsafe cache data

Parameters

unsafeCacheData
UnsafeCacheData
normalModuleFactory
NormalModuleFactory

Returns

void

serialize()

serialize(__namedParameters): void
Defined in: webpack/types.d.ts:4127

Parameters

__namedParameters
ObjectSerializerContext

Returns

void

Inherited from

Module.serialize

size()

size(type?): number
Defined in: webpack/types.d.ts:10751

Parameters

type?
string

Returns

number

Inherited from

Module.size

source()

source(dependencyTemplates, runtimeTemplate, type?): Source
Defined in: webpack/types.d.ts:10746 Use codeGeneration() instead

Parameters

dependencyTemplates
DependencyTemplates
runtimeTemplate
RuntimeTemplate
type?
string

Returns

Source

Deprecated

Inherited from

Module.source

updateCacheModule()

updateCacheModule(module): void
Defined in: webpack/types.d.ts:10767 Assuming this module is in the cache. Update the (cached) module with the fresh module from the factory. Usually updates internal references and properties.

Parameters

module
Module

Returns

void

Inherited from

Module.updateCacheModule

updateHash()

updateHash(hash, context): void
Defined in: webpack/types.d.ts:4126

Parameters

hash
Hash
context
UpdateHashContextDependency

Returns

void

Inherited from

Module.updateHash