Lua comments in builds?

Hey! Are Lua comments (inline and block) removed from the scripts when Defold builds/bundles everything up? I haven’t had a poke around the files that get produced yet, but I’d prefer it people couldn’t go poking through the comments in release builds (plus it seems minorly wasteful to include them in builds).

Thanks!

2 Likes

The scripts get put into a game.darc which has some protection. There is no removal of comments or obfuscation of scripts done. It would be possible to process the scripts to strip comments, minify and obfuscate, but it’s not a feature of the bundle process right now. It would have to be a step you set up in your batch bundling script. 1. copy a copy of the project 2. process the copy with existing Lua tools or your own methods 3. do normal batch bundling.

5 Likes

Ah, thanks for the clarity. :slight_smile:

1 Like