config
NormalModuleReplacementPlugin
new webpack.NormalModuleReplacementPlugin(resourceRegExp, newResource)
Replace resources that matches resourceRegExp with newResource. If newResource is relative, it is resolve relative to the previous resource. If newResource is a function, it is expected to overwrite the ?request? attribute of the supplied object.
ContextReplacementPlugin
new webpack.ContextReplacementPlugin(
resourceRegExp,
[newContentResource],