Skip to content

Migrate flutter test --platform=chrome off require.js AMD modules #187797

Closed

Description

@nshahan

I recently discovered that running flutter test --platform=chrome is using DDC for compilation and isn't using the version of the compiler that is now default with flutter run and flutter drive.

The tests are still relying on require.js and use the AMD module format when running DDC. This needs to be migrated to use the library bundle format instead.

The compile step will output the correct format when BuildInfo.webEnableHotReload = true but the bootstrapping logic needs to be updated to use ddc_module_loader.js, load all of the JavaScript files on the page and run the app.

Some issues I've found so far:

  • host.dart.js from package:test is served and loaded on the page first but it has errors because it expects DOM elements to exist from the package:test version of index.html. (This looks like a preexisting issue that isn't related to the module system but leaves errors in the browser console and seems like a bad practice).
  • The existing bootstrap doesn't declare the files that are needed to be loaded as part of the bootstrap process but we need that in the new module system.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-webWeb applications specifically
    team-webOwned by Web platform team
    on Jun 10, 2026
  2. added
    P1High-priority issues at the top of the work list
    triaged-webTriaged by Web platform team
    on Jun 17, 2026
  3. github-actions commented on Jul 14, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions