Skip to content

Enable DDC's Library Bundle module system by default#2839

Open
Markzipan wants to merge 2 commits into
dart-lang:mainfrom
Markzipan:ddc-library-bundle-by-default
Open

Enable DDC's Library Bundle module system by default#2839
Markzipan wants to merge 2 commits into
dart-lang:mainfrom
Markzipan:ddc-library-bundle-by-default

Conversation

@Markzipan
Copy link
Copy Markdown
Contributor

@Markzipan Markzipan commented May 29, 2026

We're updating webdev to compile DDC apps using an updated Library Bundle module format by default, replacing the legacy AMD/Require module format. This new module format supports hot reload among other load-time optimizations.

For most standard DDC web apps, this change is completely transparent. However, your app might encounter issues if:

  • You have a custom/generated index.html that contains hard-coded references to require.js or calls its methods (such as define or require).
  • You have custom build scripts or use JS parsers that expect require.js or AMD-specific code patterns.
  • Your app embeds/imports an AMD-compiled app from JS via require.js or from Flutter.

If you encounter build failures, script errors, or loader issues after updating, you can opt back into the legacy AMD module format with the --module-format flag:

webdev serve --module-format amd

webdev build --module-format amd

@Markzipan Markzipan marked this pull request as ready for review May 29, 2026 23:04
@Markzipan Markzipan requested review from davidmorgan and nshahan May 29, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant