webpack-contrib/expose-loader

NamedModulesPlugin breaks expose-loader from exposing the variable globally

NervosaX opened this issue · 0 comments

The desired setup would be to have jquery exposed globally for plugins that require it (using expose-loader). HMR and NamedModulesPlugin allows for seeing the name of the modules that have been required to be reloaded.

Instead when adding expose-loader and NamedModulesPlugin, the global variable is no longer being added correctly and crashes the application.

Here is a minimal reproduction using jquery and velocity animate:

: https://github.com/NervosaX/webpack-namedmodulesplugin-error