GoJs and requireJs

Hi Walter.

This is the plugin doing the optimization

It is specific to the Single Page Application framework:

http://durandaljs.com/

I understand that, but just trying to prove the point.

From your latest response you have now confirmed that go is in global scope which kind of defeats the object of loading it with requirejs.

In the mean time I have implemented a bit of a hack:

require(["go"], function() {
  console.log(go);
  var $ = go.GraphObject.make;
});

Still specifying “go” but not assigning the module to the go variable. This allows the go lib to be included in the optimized file but allows it to be accessed globally.

This is not something I want to carry forward.

Thanks for your help, any additional help would be appreciated to get this problem resolved.