On this page

Source Code: lib/ConcatenationScope.js#L38

Tracks the symbols and cross-module references needed while rendering a concatenated module.

new ConcatenationScope(modulesMap, currentModule, usedNames): ConcatenationScope
Source Code: lib/ConcatenationScope.js#L46
Attributes
modulesMap:ModuleInfo[] | Map<Module, ModuleInfo>
usedNames:Set<string>

Creates the mutable scope object used while rendering a concatenated module and its cross-module references.

Source Code: lib/ConcatenationScope.js#L58
Type:Set<string>
Type:string
Type:string
concatenationScope.createModuleReference(module, __namedParameters): string
Source Code: lib/ConcatenationScope.js#L144
Attributes
module:Module
__namedParameters:Partial<ModuleReferenceOptions>
Returns:string

Encodes a reference to another concatenated module as a placeholder identifier that can be parsed later during code generation.

concatenationScope.getRawExport(exportName): string | undefined
Source Code: lib/ConcatenationScope.js#L107
Attributes
exportName:string
Returns:string | undefined

Returns the raw expression registered for an export, if one exists.

concatenationScope.isModuleInScope(module): boolean
Source Code: lib/ConcatenationScope.js#L68
Attributes
module:Module
Returns:boolean

Checks whether a module participates in the current concatenation scope.

concatenationScope.registerExport(exportName, symbol): void
Source Code: lib/ConcatenationScope.js#L78
Attributes
exportName:string
symbol:string

Records the symbol that should be used when the current module exports a named binding.

concatenationScope.registerNamespaceExport(symbol): void
Source Code: lib/ConcatenationScope.js#L133
Attributes
symbol:string

Records the symbol that should be used for the synthetic namespace export.

concatenationScope.registerRawExport(exportName, expression): void
Source Code: lib/ConcatenationScope.js#L93
Attributes
exportName:string
expression:string

Records a raw expression that can be used to reference an export without going through the normal symbol map.

concatenationScope.setRawExportMap(exportName, expression): void
Source Code: lib/ConcatenationScope.js#L120
Attributes
exportName:string
expression:string

Replaces the raw expression for an export only when that export already has an entry in the raw export map.

ConcatenationScope.isModuleReference(name): boolean
Source Code: lib/ConcatenationScope.js#L178
Attributes
name:string
Returns:boolean

Checks whether an identifier is one of webpack's encoded concatenation module references.

ConcatenationScope.matchModuleReference(name): ModuleReferenceOptions & { index: number } | null
Source Code: lib/ConcatenationScope.js#L188
Attributes
name:string
Returns:ModuleReferenceOptions & { index: number } | null

Parses an encoded module reference back into its module index and reference flags.