I have something like this in my webpack config:
plugins:[
new webpack.ProvidePlugin({ THREE: \'three\' }),
...
which makes THREE available
ProvidePlugin just replaces globally the string provided with the instance of the module defined.
new webpack.ProvidePlugin({
'$': 'jquery',
'$.each': 'moment'
})
The above plugin now replaces all instances of $
in your code with the instance of jquery.
And in the second case, it replaces $.moment
with the instance of moment.
You have to understand that ProvidePlugin simply renames the module to the string you provide and I guess that is kind of an override.