Has anyone managed to obfuscate project.js?

I’m trying to use google closure compiler to “obfuscate” a little bit the CC code, but I get this error:

$ google-closure-compiler -O ADVANCED  --js_module_root ./ src/project.cb9e8.js --js_output_file src/project.cb9e8.processed.js

src/project.cb9e8.js:2: ERROR - [JSC_UNDEFINED_VARIABLE] variable cc is undeclared

Has anyone been able to obfuscate a web release?

I use https://obfuscator.io/ via copy/paste code and choose options.
It’s gui version of https://github.com/javascript-obfuscator/javascript-obfuscator May be someone enlighten us on how to integrate it to Cocos Creator build system? :innocent:

I’ve made an extension to integrate obfuscation to build process.
Here it is: https://github.com/gamedevgarage/gamedevgarage_obfuscator

Hope it helps :wink:

Wow! great contribution! I’ll try it :slight_smile:
thank you!