From 955e5e60e7a1f5497e52d35c51e94201c221c00b Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Thu, 30 Jul 2026 13:07:22 +0200 Subject: [PATCH] Add note about deferred loading to flutter.dev/platform-integration/web/wasm --- .../docs/src/content/platform-integration/web/wasm.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sites/docs/src/content/platform-integration/web/wasm.md b/sites/docs/src/content/platform-integration/web/wasm.md index c8e08d7460..88cc36b8a7 100644 --- a/sites/docs/src/content/platform-integration/web/wasm.md +++ b/sites/docs/src/content/platform-integration/web/wasm.md @@ -70,6 +70,16 @@ $ flutter build web --wasm The command produces output into the `build/web` directory relative to the package root, just like `flutter build web`. +:::note +Enabling Wasm compilation for a Flutter web app does not use deferred loading +by default. Deferred loading in Wasm is experimental and can be enabled +using the `--enable-wasm-deferred-loading` flag: + +```console +$ flutter build web --wasm --enable-wasm-deferred-loading +``` +::: + ### Open the app in a compatible web browser Even with the `--wasm` flag, Flutter will still compile the application to JavaScript. If WasmGC support is not detected at runtime, the JavaScript output