dart compile js <dart-entry-point>

Compile Dart to JavaScript

Arguments

NameDescription
dart-entry-pointThe Dart file containing the main function

Options

NameDescription
-h, --helpPrint this usage information
-o, --output <dart-entry-point>Write the output to <file-name>
--verbosity <verbosity-level>Sets the verbosity level of the compilation
-m, --minifiedGenerate minified output
-D, --define <key-value-pairs...>Define an environment declaration. To specify multiple declarations, use multiple options or use commas to separate key-value pairs. For example: dart compile aot-snapshot -D a=1,b=2 main.dart