new ContextReplacementPlugin(resourceRegExp, newContentResource?, newContentRecursive?, newContentRegExp?): ContextReplacementPluginAttributes
resourceRegExp:
<RegExp>A regular expression that determines which files will be selected
newContentResource:
<string>
|
<boolean>
|
<RegExp>
|
<Function>A new resource to replace the match
newContentRecursive:
<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.
Attributes
newContentCallback:
<Function>newContentCreateContextMap:
<Function>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>