There's a LOT of parts that do different things. They may be aliased under one command (with tons of flags) but a modern system does a lot of stuff.
For modern JS we appear to have:
- Linters (ESLint, etc)
- Transcompilation to Object Code (Babel, etc, transpile to JS)
- AoT Compilation (this & Closure Compiler, etc, do optimizations on the code ahead of running it)
- Recompilation (AST based compression - like Uglify)
- Compiling (the actual JS VM, V8, etc)
- JIT (in the actual browser)
None of these steps are alien to other build chains.