From af7955324ae9e1b32d3a2795dc707f91b5c412b7 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 11 Nov 2024 15:38:47 -0800 Subject: [PATCH] example: enable wasm runtime --- build.yaml | 23 +++++++++++++++++++++++ peanut.yaml | 10 ---------- pubspec.yaml | 2 +- 3 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 build.yaml diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..9812ce4 --- /dev/null +++ b/build.yaml @@ -0,0 +1,23 @@ +# This is JUST for the example! +# See https://github.com/dart-lang/build/tree/master/build_web_compilers#configuration +targets: + $default: + builders: + build_web_compilers|dart2js_archive_extractor: + options: + filter_outputs: false + build_web_compilers|entrypoint: + generate_for: + - example/**.dart + options: + compilers: + dart2wasm: + args: + - -O4 + - --no-strip-wasm + dart2js: + args: + - --stage=dump-info-all + - --no-source-maps + - --show-package-warnings + - -O4 diff --git a/peanut.yaml b/peanut.yaml index 2167683..6496bb3 100644 --- a/peanut.yaml +++ b/peanut.yaml @@ -1,13 +1,3 @@ # Configuration for https://pub.dev/packages/peanut directories: - example - -builder-options: - build_web_compilers|entrypoint: - dart2js_args: - - --stage=dump-info-all - - --no-frequency-based-minification - - --no-source-maps - - -O4 - build_web_compilers|dart2js_archive_extractor: - filter_outputs: false diff --git a/pubspec.yaml b/pubspec.yaml index d081cf3..ec8285b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: dev_dependencies: build_runner: ^2.2.1 - build_web_compilers: ^4.0.8 + build_web_compilers: ^4.1.0-beta.3 dart_flutter_team_lints: ^3.0.0 stream_transform: ^2.0.0 test: ^1.21.6