On this page

Attributes
new ReplaceSource(source, name?): ReplaceSource
Attributes
source:<Source>
Attributes
Replacement:<Replacement>
buffer(): Buffer
Returns:
{Buffer}

buffers(): Buffer
Returns:
<Buffer> < <ArrayBufferLike> >[]

clearCache(options?, visited?): void
Attributes
Returns:
{void}

Release cached data held by this source. clearCache is a memory hint: it never affects correctness or output, only how expensive the next read is. Subclasses override; the base is a no-op so every Source supports the call. Composite sources always recurse into wrapped sources. When the same child is reachable via several parents (e.g. modules shared across webpack chunks), pass a shared visited WeakSet so each subtree is walked at most once. Not safe to call concurrently with source/map/sourceAndMap/ streamChunks/updateHash on the same instance.


getName(): string | undefined

getReplacements(): Replacement
[]

insert(pos, newValue, name?): void
Attributes
newValue:<string>
Returns:
{void}

map(options?): RawSourceMap | null
Attributes
options:<MapOptions>
Returns:
<RawSourceMap> | <null>

original(): Source
Returns:<Source>

replace(start, end, newValue, name?): void
Attributes
start:<number>
newValue:<string>
Returns:
{void}

size(): number
Returns:<number>

source(): SourceValue

sourceAndMap(options?): SourceAndMap
Attributes
options:<MapOptions>
Returns:
{SourceAndMap}

streamChunks(options, onChunk, onSource, onName): GeneratedSourceInfo
Attributes
onChunk:<object>
onSource:<object>
onName:<object>
Returns:
{GeneratedSourceInfo}

updateHash(hash): void
Attributes
Returns:
{void}