tested version: cocos2d-2.1rc0-x-2.1.3
when running obfuscated game.js, it reported JS: assets/jsb_cocosbuilder.js:74:TypeError: q[f] is not a constructor
it is actually from
JS: assets/jsb_cocosbuilder.js:74:TypeError: _ccbGlobalContext[documentControllerName] is not a constructor
Did you test it by TestJavascirpt?
Testjavascipt worked even if I regenerated the game.js.
it’s my own project.
It might be the ADVANCED_OPTIMIZATIONS of closure compiler which has Removal of Code You Want to Keep.
I found game.js missed some cocos2dx functions like gl.*, because I didn’t use them in my js code.
using compilationLevel=“simple” has no issues.
Does anyone know how to resolve this kind of compilationLevel=“advanced” issue of Closure Compiler ?
I have also experienced this problem.
The situation is i used a ccb file which is binding a js script named a.js, but i do not write " requir (“a.js”) " in the sicrpt which i call the function “cc.BuilderReader.loadAsScene”