I am trying to convert a project from SystemJS to WebPack which is using breeze-client and datajs (for OData support). In total, this is an angular2 application, so breeze-bridge-angular2 is also part of the project.
While the SystemJS version runs fine, the WebPack version throws an error:
Unable to initialize OData. Needed to support remote OData
Apparently, the issue is that breeze-client is unable to find the OData library in global.window.OData. Some quick debugging shows that the root cause appears to be that "global.window" is generally undefined (in function __requireLibCore). Note that datajs is appears to be correctly included in webpack, so the issue is not a missing datajs, rather breeze-client not being able to access "window" in general.
I am pretty new to the entire topic, so I am struggling to identify the correct solution. I believe something needs to be configured in webpack to make this work, but I am not sure what this something could be - my apologies for being vague here - perhaps some imports-loader or ProvidePlugin reference in webpack.config.js.
Any help would be much appreciated.