Skip to main content
webpack / sources / ReplaceSource

Class: ReplaceSource

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

Extends

Constructors

Constructor

new ReplaceSource(source, name?): ReplaceSource
Defined in: webpack/types.d.ts:15324

Parameters

source
Source
name?
string

Returns

ReplaceSource

Overrides

Source.constructor

Properties

Replacement

static Replacement: typeof Replacement
Defined in: webpack/types.d.ts:15348

Methods

buffer()

buffer(): Buffer
Defined in: webpack/types.d.ts:17445

Returns

Buffer

Inherited from

Source.buffer

getName()

getName(): string
Defined in: webpack/types.d.ts:15325

Returns

string

getReplacements()

getReplacements(): Replacement[]
Defined in: webpack/types.d.ts:15326

Returns

Replacement[]

insert()

insert(pos, newValue, name?): void
Defined in: webpack/types.d.ts:15328

Parameters

pos
number
newValue
string
name?
string

Returns

void

map()

map(options?): RawSourceMap
Defined in: webpack/types.d.ts:17447

Parameters

options?
MapOptions

Returns

RawSourceMap

Inherited from

Source.map

original()

original(): Source
Defined in: webpack/types.d.ts:15329

Returns

Source

replace()

replace(start, end, newValue, name?): void
Defined in: webpack/types.d.ts:15327

Parameters

start
number
end
number
newValue
string
name?
string

Returns

void

size()

size(): number
Defined in: webpack/types.d.ts:17446

Returns

number

Inherited from

Source.size

source()

source(): SourceValue
Defined in: webpack/types.d.ts:17444

Returns

SourceValue

Inherited from

Source.source

sourceAndMap()

sourceAndMap(options?): SourceAndMap
Defined in: webpack/types.d.ts:17448

Parameters

options?
MapOptions

Returns

SourceAndMap

Inherited from

Source.sourceAndMap

streamChunks()

streamChunks(options, onChunk, onSource, onName): GeneratedSourceInfo
Defined in: webpack/types.d.ts:15330

Parameters

options
StreamChunksOptions
onChunk
(chunk, generatedLine, generatedColumn, sourceIndex, originalLine, originalColumn, nameIndex) => void
onSource
(sourceIndex, source, sourceContent?) => void
onName
(nameIndex, name) => void

Returns

GeneratedSourceInfo

updateHash()

updateHash(hash): void
Defined in: webpack/types.d.ts:17449

Parameters

hash
HashLike

Returns

void

Inherited from

Source.updateHash