You can minify lua code by https://github.com/defold/extension-prometheus
I make a fork of prometheus where i forced PrettyPrint to keep new line.
I do this because I need to get an understandable traceback on error.
This is web build.
prometheus.lua
return {
-- The default LuaVersion is Lua51
LuaVersion = "Lua51"; -- or "LuaU"
-- All Variables will start with this prefix
VarNamePrefix = "";
-- Name Generator for Variables that look like this: b, a, c, D, t, G
NameGenerator = "MangledShuffled";
-- No pretty printing
PrettyPrint = true;
-- Seed is generated based on current time
-- When specifying a seed that is not 0, you will get the same output every time
Seed = 1050;
-- Obfuscation steps
Steps = {
}
}