Does jsb support requirejs?

I have a game based on cocos2d-html5 and I got it to work with requirejs.

Now I’d like to make it run with JSB. What modification do I need to make it work?

Thanks

I had to rename requirejs calls to “earquire” in order to work with JSB, because require is a JSB native special keyword

Hi Jose,

Thanks for your reply. I still couldn’t get it to work though. Looking at the code, require.js tries to load js file through DOM API which we don’t have. It creates

element and set ‘src’ on it to load a specific js file. It is failing here silently as require.js only knows about how to load in browser and nodejs. Could you please share some details? I guess first of all I need to use the require call provided by JSB to load all the js files. And then rename change require in require.js to something else. Is there anything else needed? Thanks. Jose Antonio Andujar wrote: > I had to rename requirejs calls to “earquire” in order to work with JSB, because require is a JSB native special keyword