On this page

new NormalModuleReplacementPlugin(resourceRegExp, newResource): NormalModuleReplacementPlugin
Attributes
resourceRegExp:RegExp
the resource matcher
newResource:string | ((resolveData: ResolveData) => void)
the resource replacement

Create an instance of the plugin

Attributes
newResource:string | ((resolveData: ResolveData) => void)
resourceRegExp:RegExp
apply(compiler): void
Attributes
compiler:Compiler
the compiler instance
Returns:void

Applies the plugin by registering its hooks on the compiler.