webpack.ProvidePlugin is being too smart

report a bug

we have this block for angular to find jquery, and we also want to expose jquery to the window

webpack config:

new webpack.ProvidePlugin({
      // allows angular to find JQuery
      "window.jQuery": "jquery"
})

globalExport.js

var globalWindow = window;
globalWindow.jQuery = $;

If the current behavior is a bug, please provide the steps to reproduce.
in 2.2.1 it used to generate:

var globalWindow = window;
globalWindow.jQuery = $;

and in 3.2.0 it’s generating:

var globalWindow = window;
__webpack_provided_window_dot_jQuery = $;

Author: Fantashit

2 thoughts on “webpack.ProvidePlugin is being too smart

Comments are closed.