Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


hardcode in jsloader.js #524

zj831007 opened this Issue · 3 comments

5 participants


why to hardcode like this: que.push('main.js');
if do this, I dont change my dir of main.js.


It is only for application entry, and it can be adjusted if needed.

What is your requirement?

Do you have any suggestion?


This is totally a drive-by comment, but something like this might work well:

// around line 111
var $c = d.querySelector('#cocos2d-html5')
  , c = $c.c;

// around line 150
que.push( $c.getAttribute('data-main') || 'main.js');

I could make a pull request for this, but I honestly haven't used cocos2d yet!


I had the same issue. Now i'm bypassing this by ignoring the main.js mentioned in jsloader (the file just is not on the root of my site) and adding my own main.js in the appFiles.

The suggestion of kirbysayshi feels like a more correct solution.

@dingpinglv dingpinglv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.