Skip to content

[CP-beta]Copy part files and sourcemaps when building with dart2js. - #146361

Merged
auto-submit[bot] merged 1 commit into
flutter:flutter-3.22-candidate.0from
flutteractionsbot:cp-beta-75ae44df77aef3d109add07abfd88438732bbee8
Apr 8, 2024
Merged

auto-submit[bot] merged 1 commit into
flutter:flutter-3.22-candidate.0from
flutteractionsbot:cp-beta-75ae44df77aef3d109add07abfd88438732bbee8

Conversation

@flutteractionsbot

@flutteractionsbot flutteractionsbot commented Apr 5, 2024 •

Copy link
Copy Markdown
Contributor

This pull request is created by automatic cherry pick workflow

Issue Link:

#145653

Changelog Description:

Fixes and issue where dart2js deferred part files were not being properly emitted by a web build.

Impact Description:

Users who use deferred loading in dart2js will not have any of the deferred JS files copied to their build directory.

Workaround:

Users can manually copy the part files out of the .dart_tool/flutter_build directory into their build/web folder.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

Follow the repro steps listed in #145653.
Ensure that the build/web folder contains the main.dart.js_1.part.js and main.dart.js_1.part.js.map files.

…46356)

This fixes flutter#145653

When dart2js emits deferred part files, they need to be copied from the build folder to the output folder.
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Apr 5, 2024
@flutteractionsbot

Copy link
Copy Markdown
Contributor Author

@eyebrowsoffire please fill out the PR description above, afterwards the release team will review this request.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 5, 2024
@yjbanov

yjbanov commented Apr 5, 2024

Copy link
Copy Markdown
Contributor

LGTM

@godofredoc godofredoc added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 8, 2024
@auto-submit
auto-submit Bot merged commit fa0a4c0 into flutter:flutter-3.22-candidate.0 Apr 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 14, 2024
liuyq pushed a commit to liuyq/flutter that referenced this pull request Jan 26, 2026
…lutter#146361)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process#automatically-creates-a-cherry-pick-request)

flutter#145653

Fixes and issue where dart2js deferred part files were not being properly emitted by a web build.

Users who use deferred loading in dart2js will not have any of the deferred JS files copied to their build directory.

Users can manually copy the part files out of the `.dart_tool/flutter_build` directory into their `build/web` folder.

What is the risk level of this cherry-pick?

Are you confident that your fix is well-tested by automated tests?

Follow the repro steps listed in flutter#145653.
Ensure that the `build/web` folder contains the `main.dart.js_1.part.js` and `main.dart.js_1.part.js.map` files.
@flutteractionsbot
flutteractionsbot deleted the cp-beta-75ae44df77aef3d109add07abfd88438732bbee8 branch July 20, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants