How can I obfuscate the asar file?

My friend discovered he could change the game’s code (speed of the characters, gravity, etc.), and as the developer of the game, I would not want something like that to happen. I did a bunch of research but the only thing I’ve found was Javascript Obfuscator. I tried to obfuscate one file and replace it with the original file but the game didn’t open. Which files I need to obfuscate to prevent players from changing the code?

To efficiently obfuscate you should bundle everything in one file with something like webpack.