Repository navigation
[web] Correct --web-content-hash docs against shipped Flutter 3.50.0 - #14088
Merged
Merged
Conversation
…ate checks for Flutter 3.50
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for Flutter's --web-content-hash flag, detailing how hashes are applied to compiled entrypoints and assets, how they are recorded in the bootstrap configuration, and the implications for asset loading and build failures. The review feedback suggests two improvements for accuracy: clarifying that the emitted AssetManifest files are also content-hashed to prevent 404 errors, and noting that the build check succeeds if web/index.html inlines flutter_bootstrap.js instead of just loading it.
Collaborator
|
Staged preview of the updated docs.flutter.dev site (updated for commit 0c05c6d): |
Contributor
Author
|
CC @conooi |
Collaborator
|
Staged preview of the updated flutter.dev site (updated for commit 761571d): |
conooi
self-requested a review
November 16, 2026 20:05
conooi
reviewed
Nov 16, 2026
conooi
approved these changes
Nov 17, 2026
11 tasks done
MrZaKaRiA
pushed a commit
to MrZaKaRiA/flutter
that referenced
this pull request
Nov 20, 2026
… and canvaskit (flutter#196908) Updates the "Serving tip" that `flutter build web --web-content-hash` prints so it matches what the build actually hashes: - Says that everything under `assets/` is hashed and safe to cache as `immutable`, not just the `main.dart.<hash>.*` entrypoints. - Warns about `canvaskit/` in every build, not only with `--no-web-resources-cdn`. `WebBuiltInAssets` always copies `canvaskit/**` into `build/web` without hashes, so a broad host rule such as `**/*.wasm → immutable` would catch a self-hosted `skwasm.wasm`. - Links straight to https://docs.flutter.dev/deployment/web#web-content-hashing. - Removes the stale TODO waiting on flutter/website#13825. The docs landed in flutter/website#13986 and flutter/website#14088, and the flag is staying opt-in. Build behavior is unchanged. Only the printed message and its test change. Part of flutter#149031 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant in-code documentation (doc comments with `///`). - [x] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/CONTRIBUTING.ai.md [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of what this PR is changing or adding, and why:
Corrects the
--web-content-hashdocs from #13986 to match the implementation shipped in Flutter 3.50.0 (ab2912035e).canvaskit/**is always copied unhashed intobuild/web, not only with--no-web-resources-cdn. Adds a note that the default runtime loads CanvasKit/Skwasm from the versioned gstatic CDN, and that a self-hostedcanvaskit/**must never be servedimmutable.AssetManifest.bin.<hash>.json, and states thatAssetManifest.jsonis not emitted.index.htmlrequirement ininitialization.md: only a customweb/flutter_bootstrap.jsneeds{{flutter_build_config}};index.htmljust has to loadflutter_bootstrap.js.assets/...URL 404 caveat, andprecache_manifest.jsonURL format and exclusions.flutter.js.map,flutter_service_worker.js,precache_manifest.json,favicon.png, otherweb/files).Issues fixed by this PR (if any):
PRs or commits this PR depends on (if any):
Presubmit checklist
of 80 characters or fewer.