medz / qq-emoicon
QQ表情
Requires
- php: >=5.3.9
- symfony/finder: ^2.8|^3.1
This package is auto-updated.
Last update: 2026-06-22 19:38:12 UTC
README
dart2esm is a Dart-to-native-ESM compiler.
The compiler uses Dart's Common Front End and Kernel IR as the frontend, then emits clean ECMAScript modules. JavaScript and Node primitives are used directly where they are semantically equivalent, with small Dart semantic helpers emitted only when required.
The 0.1.0 goal is complete Dart syntax and Dart SDK lowering to native ESM,
except for dart:io. ESM version targeting is intentionally not split into
compatibility profiles yet.
Usage
dart2esm bin/main.dart -o dist/main.mjs
By default the generated module invokes main() at top level. Use
--no-run-main when the output should be imported as a module without executing
the Dart entrypoint:
dart2esm lib/example.dart -o dist/example.mjs --no-run-main
You can also compile an existing Kernel component:
dart2esm build/input.dill -o dist/input.mjs
Architecture
- Dart source is lowered with
dart compile kernel --no-link-platform --embed-sources. - Kernel bytes are read with
package:kernel. - The backend walks the entry component and emits native
.mjs. - Entry-library declarations are exported as ESM bindings. Imported local Dart libraries are bundled into the same output module as internal declarations.
Unsupported Libraries
dart:io APIs are not supported in 0.1.0.