score:0

Accepted answer

Cubism is not loading as expected when using require.js in my case. I have a workaround to this issue where I change the requirejs config as:

requirejs.config({
baseUrl: './',
paths: {
    jquery: './jquery-1.10.2.min',
    d3: 'http://d3js.org/d3.v3.min',
    cubism_v1: './cubism.v1'
},
shim: {
    cubism_v1: {
        deps: ['d3']
    }
}
});

And declare another module as:

define('cubism', ['cubism_v1'], function (cubism) {
   return this.cubism; 
});

Then I am able to use cubism in other places as required.

requirejs(['jQuery', 'd3', 'cubism'], function (jQuery, d3, cubism) {
   // cubism related code here
});

Related Query

More Query from same tag