On this page

new ContextReplacementPlugin(resourceRegExp, newContentResource?, newContentRecursive?, newContentRegExp?): ContextReplacementPlugin
Attributes
resourceRegExp:<RegExp>
A regular expression that determines which files will be selected
newContentResource:<string> | <boolean> | <RegExp>
| (context: <BeforeContextResolveData> | <AfterContextResolveData> ) => <void> A new resource to replace the match
If true, all subdirectories are searched for matches
newContentRegExp:<RegExp>
A regular expression that determines which files will be selected

Creates an instance of ContextReplacementPlugin.

apply(compiler): void
Attributes
compiler:<Compiler>
the compiler instance
Returns:<void>

Applies the plugin by registering its hooks on the compiler.