1 and 2, you’re correct.
3, it’s not really tree shaking. It is concatenating all files and merging source maps if any. The next release of jsoo will be able to omit unused compilation units from libraries similar to ocamlc. (Maybe you can call that tree shaking)
Some dead code elimination happens in (2).
“Tree shaking” happens when doing whole program compilation with jsoo