On this page

new ContextReplacementPlugin(resourceRegExp, newContentResource?, newContentRecursive?, newContentRegExp?): ContextReplacementPlugin
Attributes
resourceRegExp:<RegExp>
newContentResource:<string> | <boolean> | <RegExp> | <object>
newContentRecursive:<boolean> | <RegExp>
newContentRegExp:<RegExp>

Creates an instance of ContextReplacementPlugin.

Attributes
newContentCallback:<object>
newContentCreateContextMap:<object>
Stores new content create context map.
newContentRecursive:<boolean>
newContentRegExp:<RegExp>
newContentResource:<string>
resourceRegExp:<RegExp>
apply(compiler): void
Attributes
compiler:<Compiler>
Returns:
{void}

Applies the plugin by registering its hooks on the compiler.