How do I access the global object (window) using webpack?
问题 I'm trying to interface ActionScript with JavaScript using ExternalInterface and webpack. ExternalInterface can only provoked ( call ) functions found on the global object ( window ). How can I get a webpack module reference on window (global object)? Allow me to elaborate some, I want to have a namespace for the company ( window.companyName ) with an interface for ExternalInterface : window.companyName = { isReady: function() { ... }, driver1: function() { ... }, driver2: function() { ... }