3 ms·
Just for grins, I compiled the Dart app I'm working on now with --minify. It went from 530K to 240K. Then I cleared the --minify flag and used the Closure Compi
by michaelwww 14y ago
Just for grins, I compiled the Dart app I'm working on now with --minify. It went from 530K to 240K. Then I cleared the --minify flag and used the Closure Compiler but it failed with errors. Not sure what is going on yet, but I don't think this is necessary or advisable -- I've never read of anyone using the Closure Compiler with Dart. Here is a sample few lines from --minify. It's fairly minimal.
function I(){}
init()
var $=I.p
var $$={}
- weareconvo 14y agoOkay, but um, why did minify not get rid of the module i wasn't even using?
- michaelwww 14y agoJust to be clear, here is what I did. Dart source -> dart2js -> JavaScript (530K) Dart source -> dart2js -> JavaScript (530K) -> Closure Compiler -> *error* Dart source -> dart2js --minify -> JavaScript (240K) If I import a module and don't use it, such as 'dart:utf', the resulting JavaScript output size does not go up. If I call a function in dart:utf the JavaScript size goes up. If I stop calling the function, the size goes down. If I create a function but don't call it, the size stays the same. If I call it, the size goes up. Everything seems to be working. They just release a new version a few days ago and I'm on the latest.