建立build.yaml文件,并进行如下配置
targets:
$default:
builders:
build_web_compilers|entrypoint:
# These are globs for the entrypoints you want to compile.
generate_for:
- test/**.browser_test.dart
- web/**.dart
options:
compiler: dart2js
# List any dart2js specific args here, or omit it.
dart2js_args:
- -O0
在命令行执行如下命令
pub run build_runner build --output web:build -r
详细命令详解见如下命令工具
dart2js: Dart-to-JavaScript compiler
webdev 部署