Skip to content

Commit

Permalink
Adding DDC module system targets to web SDK artifacts. (#47783)
Browse files Browse the repository at this point in the history
This is part of an ongoing effort to replace DDC's module system in Flutter Web (for hot reload support).

Side effects of this change include doubling the code generated by DDC whenever this build pathway is hit (until the full module system transition lands), but this shouldn't affect debug performance. We may be able to lock this behind a build flag if this is an issue. 

See related issue: dart-lang/sdk#52361
  • Loading branch information
Markzipan authored Jan 25, 2024
1 parent a759e94 commit 4424ea2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions web_sdk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,14 @@ template("_compile_ddc_modules") {
amd_js_path =
"$root_out_dir/flutter_web_sdk/kernel/amd${name_suffix}/dart_sdk.js"

ddc_js_path =
"$root_out_dir/flutter_web_sdk/kernel/ddc${name_suffix}/dart_sdk.js"

outputs = [
amd_js_path,
amd_js_path + ".map",
ddc_js_path,
ddc_js_path + ".map",
]

if (invoker.sound_null_safety) {
Expand Down Expand Up @@ -403,6 +408,10 @@ template("_compile_ddc_modules") {
"amd",
"-o",
rebase_path(amd_js_path),
"--modules",
"ddc",
"-o",
rebase_path(ddc_js_path),
]
if (flutter_prebuilt_dart_sdk) {
args += [
Expand Down

0 comments on commit 4424ea2

Please sign in to comment.