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 = $;
We’re using this for exposing to the window, and it works great: https://github.com/webpack-contrib/expose-loader
@rafde unfortunately, AngularJS relies on calling
window.jQuery
, butwindow.jQuery
isn’t assigned until after AngularJS runs.