http://stackoverflow.com/questions/8815437/why-is-javascript...
> And the size of helloworld.dart.app.js is 102k
> When ran in optimize mode, it generated the following javascript - helloworld.dart.js which is of size 20k
http://stackoverflow.com/questions/8815437/why-is-javascript...
> And the size of helloworld.dart.app.js is 102k
> When ran in optimize mode, it generated the following javascript - helloworld.dart.js which is of size 20k
No, it's not.
dart2js --minify hello.dart -o hello.dart.js
Results in a 5 KB JS file.This game is 35 KB (procedural graphics included):
264 Mar 5 12:21 a.dart
237K Mar 5 12:21 a.js
101K Mar 5 12:22 a.min.js
It was also slow to compile, 6 secs.Anything I'm missing?
Also note that you could now add a thousand lines of code and the file size wouldn't increase much. You already paid that one-time cost.
You can further improve the size by using a better minifier on top of --minify.
Though as a counterpoint (and relevant to angular 2 :) I read they're going to just use the raw dom api's instead of a jquery/jquery-lite abstraction layer as the dom api's don't need the smoothing over in modern browsers like they used to.