Flutter Web Bootstrapping Improvements#144434
Merged
auto-submit[bot] merged 30 commits intoflutter:masterfrom Mar 12, 2024
Merged
Flutter Web Bootstrapping Improvements#144434auto-submit[bot] merged 30 commits intoflutter:masterfrom
auto-submit[bot] merged 30 commits intoflutter:masterfrom
Conversation
ditman
reviewed
Mar 7, 2024
Member
ditman
left a comment
There was a problem hiding this comment.
Man, this looks GREAT. I'm updating one of my test apps to use this, see how it goes!
Co-authored-by: David Iglesias <[email protected]>
ditman
reviewed
Mar 8, 2024
Member
ditman
left a comment
There was a problem hiding this comment.
I have been testing this, and it's great. I wonder if the flutter_bootstrap.js file could be minified!
Also, somewhat unrelated to this PR (but IMO relevant for the feature); it'd be nice to have more feedback when the flutter bootstrap falls-back to JS, why.
Right now I have an application deployed that I'd expect to see in --wasm, but it's falling back to JS (in a supposedly supported browser), and I don't know why!
| return stripLeadingSlash(stripTrailingSlash(baseHref)); | ||
| } | ||
|
|
||
| List<WebTemplateWarning> getWarnings() { |
Member
There was a problem hiding this comment.
Not sure if possible, but it'd be nice that these warnings were also emitted on flutter run.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 14, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 14, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 14, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 14, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 14, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 14, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 14, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 15, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 16, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 16, 2024
atsansone
pushed a commit
to atsansone/website
that referenced
this pull request
Mar 18, 2024
_Description of what this PR is changing or adding, and why:_ Update Wasm getting started instructions to: - Simplify a bit - Rely on the standard template to ensure they are compatible - Align with bootstrap changes landed in flutter/flutter#144434 ## Presubmit checklist - [ ] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [ ] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [ ] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
atsansone
pushed a commit
to atsansone/website
that referenced
this pull request
Apr 5, 2024
_Description of what this PR is changing or adding, and why:_ Update Wasm getting started instructions to: - Simplify a bit - Rely on the standard template to ensure they are compatible - Align with bootstrap changes landed in flutter/flutter#144434 ## Presubmit checklist - [ ] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [ ] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [ ] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
sfshaza2
added a commit
to flutter/website
that referenced
this pull request
May 7, 2024
This updates the documentation to be in line with the new changes to bootstrapping that are coming in this PR: flutter/flutter#144434 --------- Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 14, 2024
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.
This makes several changes to flutter web app bootstrapping.
flutter_bootstrap.jsfile.flutter_bootstrap.jsfile in thewebsubdirectory in the project directory which can have whatever custom bootstrapping logic they'd like to write instead. This file is also templated, and can use any of the tokens that can be used with theindex.html(with the exception of{{flutter_bootstrap_js}}, see below).index.html:{{flutter_js}}=> inlines the entirety offlutter.js{{flutter_service_worker_version}}=> replaced directly by the service worker version. This can be used instead of the script that sets theserviceWorkerVersionlocal variable that we used to have by default.{{flutter_bootstrap_js}}=> inlines the entirety offlutter_bootstrap.js(this token obviously doesn't apply toflutter_bootstrap.jsitself).IndexHtmlto be calledWebTemplateinstead, since it is used for more than just the index.html now.(const|var) serviceWorkerVersion = null) and recommends using{{flutter_service_worker_version}}token insteadFlutterLoader.loadEntrypointand recommend usingFlutterLoader.loadinsteadflutter_service_worker.js.index.htmlonflutter createnow uses an async script tag withflutter_bootstrap.js.