Too large JS-file generated Too large JS-file generated dart dart

Too large JS-file generated


@media-slave24

Maybe this will be helpful for You:https://code.google.com/p/dart/issues/detail?id=14686

It's reported on dart bug tracking system. Some people using mirrors got 760kb. So it's definitely a bug.


UPDATE (Jan '14): AngularDart 0.9.5 now includes a standard MirrorsUsed list. To finalize it and trigger Dart's tree-shaking optimizations, you need to add a MirrorsUsed to your program

  • listing all the classes you introduce.
  • override: '*' to finalize the MirrorsUsed.

Since helloworld has no new classes, say:

@MirrorsUsed(override: '*')import 'dart:mirrors';

See Github for the complete helloworld program

The key is to include a @MirrorsUsed annotation in your Dart file. Pavel's link to the AngularDart tutorial is an excellent resource.

To actually answer your question: Yes, AngularDart can be used in production but be aware that it is in "beta" release right now. We expect many breaking API changes!


Take a look at angular.dart.tutorial Chapter 7 about deployment. It has a section on managing compiled code size:

https://github.com/angular/angular.dart.tutorial/tree/master/Chapter_07