Google Closure Compiler сжимает JavaScript.
1. Ищите в интернете "Google Closure Compiler binary".
2. Допустим пишите код, назовём файл hello.js:

Код:
function hello() {
  console.log('Hello World!');
}

hello();

3. Теперь запустим комплиятор, у меня файл называется closure-compiler-v20200719.jar:

Код:
java -jar closure-compiler-v20200719.jar  --js hello.js --js_output_file hello-min.js

4. Результат hello-min.js:

Код:
function hello(){console.log("Hello World!")}hello();