I'm new with cocos2d. I'm using cocos2d-js 3.0 rc2, and want to develop a web game.
I have completed my code and it goes well with WebStorm in the debug mode. But when I release the codes to the real web server, there is a js error when run the game. (command: cocos2d compile -p web -m release)
I analysed the source(game.min.js) which is generate by the command above, and find the reason is that a field of an object is compressed by cocos, but the object is a external json data,which is the game data.
the json data is like the following: var stageData={rows:[{nodes:[{num:0},{num:0},{num:0}, ...;
the source before compile: this.rowNum = stageData.rows.length; this.colNum = stageData.rows[0].nodes.length;
the source after compile: this.Ph=stageData.rows.length;this.Di=stageData.rows[0].Jc.length;
"noes" is replaced to "Jc".
Can anyone tell me how to resolve this? Thanks!