If you write something like:
import 'package:flutter_web/animations.dart'; void main() => print('Hello, World!');
dart2js would include 0 bytes of code from animations.dart into the output.
> `webdev build` failed for me in examples/gallery
Maybe file a bug?
Here is what I get for Gallery:
╭─~/s/f/f/e/gallery ⟨master ⟩ ⟨9s449ms⟩ ╰─» flutter packages pub global run webdev build ... Compiled 18,344,245 characters Dart to 1,914,077 characters JavaScript in 27.9 seconds
Gallery uses a lot of Flutter so this is in some sense upper boundary for framework overhead.
Also it is still early days - I can clearly see this pushed down.
If you write something like:
DDC would faithfully compile animations.dart as whole and ship that to your browser.dart2js would include 0 bytes of code from animations.dart into the output.
> `webdev build` failed for me in examples/gallery
Maybe file a bug?
Here is what I get for Gallery:
If I gzip the output I get around 500k.Gallery uses a lot of Flutter so this is in some sense upper boundary for framework overhead.
Also it is still early days - I can clearly see this pushed down.