Skip to main content
webpack / ContextReplacementPlugin

Class: ContextReplacementPlugin

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

Constructors

Constructor

new ContextReplacementPlugin(resourceRegExp, newContentResource?, newContentRecursive?, newContentRegExp?): ContextReplacementPlugin
Defined in: webpack/types.d.ts:3694

Parameters

resourceRegExp
RegExp
newContentResource?
string | boolean | RegExp | (context) => void
newContentRecursive?
boolean | RegExp | NewContentCreateContextMap
newContentRegExp?
RegExp

Returns

ContextReplacementPlugin

Properties

newContentCallback()?

optional newContentCallback: (context) => void
Defined in: webpack/types.d.ts:3705

Parameters

context
AfterContextResolveData | BeforeContextResolveData

Returns

void

newContentCreateContextMap()?

optional newContentCreateContextMap: (fs, callback) => void
Defined in: webpack/types.d.ts:3709

Parameters

fs
InputFileSystem
callback
(err, newContentRecursive) => void

Returns

void

newContentRecursive?

optional newContentRecursive: boolean
Defined in: webpack/types.d.ts:3716

newContentRegExp?

optional newContentRegExp: RegExp
Defined in: webpack/types.d.ts:3717

newContentResource?

optional newContentResource: string
Defined in: webpack/types.d.ts:3708

resourceRegExp

resourceRegExp: RegExp
Defined in: webpack/types.d.ts:3704

Methods

apply()

apply(compiler): void
Defined in: webpack/types.d.ts:3722 Apply the plugin

Parameters

compiler
Compiler

Returns

void