new ContextReplacementPlugin(resourceRegExp, newContentResource?, newContentRecursive?, newContentRegExp?): ContextReplacementPluginAttributes
resourceRegExp:
<RegExp>A regular expression that determines which files will be selected
| (context:
<BeforeContextResolveData>
|
<AfterContextResolveData>
) =>
<void>
A new resource to replace the matchnewContentRecursive:
<boolean>
|
<RegExp>
|
<NewContentCreateContextMap>If true, all subdirectories are searched for matches
newContentRegExp:
<RegExp>A regular expression that determines which files will be selected
Returns:
<ContextReplacementPlugin>Creates an instance of ContextReplacementPlugin.
newContentCallback(context:<BeforeContextResolveData>|<AfterContextResolveData>) =><void>newContentCreateContextMap(fs:<InputFileSystem>, callback: (err:<Error>|<null>, newContentRecursive:<NewContentCreateContextMap>) =><void>) =><void>Stores new content create context map.newContentRecursive<boolean>newContentRegExp<RegExp>newContentResource<string>resourceRegExp<RegExp>
apply(compiler): voidAttributes
compiler:
<Compiler>the compiler instance
Returns:
<void>Applies the plugin by registering its hooks on the compiler.
[index: {string}]<string>