What makes webapps bloated is the require-at-the-top pattern. Type system makes no difference here. What most devs don't realize is that if their precious app written in holy C plus plus or Java got compiled into a standalone binary that could run on any device inside a browser, it would be a 150 MB mess that wouldn't even boot. All these nice frameworks, libs and utils would need to be downloaded before the app can start. We'll see this soon with wasm, btw.