Cocos2d-JS issue with release compile for web

Cocos2d-JS issue with release compile for web
0.0 0

#1

@slackmoehrle
Hi,
We using cocos2d-js 3.14.1

We have preload scene after which switching game - in debug mode everything works smooth , we getting preload and after game is loaded.

But when we compile with flag
-m release

strange things starts happening, like when switching preload scene to game scene -> background color starting to blink - transition color doesn’t match what is configured in code (it is to light).

After that on game over state when we show Game Over screen - colors on it also get wrong. So it happens only after we minified JS with -m release command.

How we can find what goes with this minifying stuff, maybe there is some issue in core which wrongly minifying code.


#2

I’m dealing with same problem. I have a list of predefined messages, if user click on a message item, client will send this message to server. It’s working if I build for iOS with debug options checked, but if it’s unchecked, the function is not working anymore. I’m now testing again my whole game with debug unchecked to see any more problem


#3

I did notice, if within your code, you access name property of a class or function, it’ll be null on release mode, result in malfunction behavior
Hope this help!