I have js libraries that are initialized as follows:
(function(root) { ...... ...... })(this)
when building with webpack, I get something like
function(module, exports) { (function(root) { })(this) }
"this" is not a window as libraries suggest. Is there a neat way to tame this type of library to work with webpack? My last resort would be to crack this window using a postloader or something like that.
source share