Skip to content

docs(web): add Wasm compile error and migration guide - #13662

Open
kevmoo wants to merge 4 commits into
mainfrom
wasm-compile-error-docs
Open

docs(web): add Wasm compile error and migration guide#13662
kevmoo wants to merge 4 commits into
mainfrom
wasm-compile-error-docs

Conversation

@kevmoo

@kevmoo kevmoo commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Add step-by-step guidance for developers encountering compile-time failures when targeting WebAssembly during Flutter web builds.

  • Explains how to leverage dry-run warnings from flutter build web for early detection.
  • Instructs developers on isolating the structured dependency import chain tree from verbose exception stack traces during --wasm builds.
  • Documents migration strategies from legacy libraries (dart:html, package:js) to package:web and dart:js_interop via conditional imports.
  • Cross-links compilation error troubleshooting in FAQ and web building guides.

Add step-by-step guidance for developers encountering compile-time failures when targeting WebAssembly during Flutter web builds.

* Explains how to leverage dry-run warnings from `flutter build web` for early detection.
* Instructs developers on isolating the structured dependency import chain tree from verbose exception stack traces during `--wasm` builds.
* Documents migration strategies from legacy libraries (`dart:html`, `package:js`) to `package:web` and `dart:js_interop` via conditional imports.
* Cross-links compilation error troubleshooting in FAQ and web building guides.
Comment thread sites/docs/src/content/platform-integration/web/wasm.md Outdated
Comment thread sites/docs/src/content/platform-integration/web/wasm.md
@flutter-website-bot

flutter-website-bot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit 955e974):

https://flutter-docs-prod--docs-pr13662-wasm-compile-error-doc-4ocvnk3a.web.app

@flutter-website-bot

flutter-website-bot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit 955e974):

https://flutter-dev-230821--www-pr13662-wasm-compile-error-doc-cbx3dvu6.web.app

….dev

* Inverts conditional imports in FAQ and Wasm guides so `dart.library.js` precedes `dart.library.js_interop` for legacy JS compilation fallback.
* Adds direct inline links to dart.dev migration, usage, and conditional import documentation in the Wasm troubleshooting subsection.
@kevmoo
kevmoo requested a review from conooi August 3, 2026 20:04
@kevmoo
kevmoo marked this pull request as ready for review August 3, 2026 20:04
@kevmoo
kevmoo requested review from a team and sfshaza2 as code owners August 3, 2026 20:04

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new section to the Flutter Web Wasm documentation titled "Diagnosing Wasm compilation errors" and links to it from the building and FAQ pages. The review feedback points out a critical logic error in the conditional import code examples across both faq.md and wasm.md: because dart.library.js_interop is supported on both JS-compiled web and WebAssembly, evaluating it last causes JS-compiled builds to incorrectly select the Wasm implementation. The reviewer also identified a minor grammatical typo in the newly added documentation.

Comment thread sites/docs/src/content/platform-integration/web/faq.md
Comment thread sites/docs/src/content/platform-integration/web/wasm.md
Comment thread sites/docs/src/content/platform-integration/web/wasm.md Outdated
kevmoo added 2 commits August 3, 2026 21:12
* Removes redundant article from literal compiler output in troubleshooting reference block.
Comment thread firebase.json
{ "source": "/to/use-mirror-site", "destination": "/community/china#configure-your-machine-to-use-a-mirror-site", "type": 301 },
{ "source": "/to/use-profile-mode", "destination": "/perf/ui-performance#run-in-profile-mode", "type": 301 },
{ "source": "/to/wasm", "destination": "/platform-integration/web/wasm", "type": 301 },
{ "source": "/to/wasm-errors", "destination": "/platform-integration/web/wasm#diagnosing-wasm-compilation-errors", "type": 301 },

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants