flutter/packages
Jackson Gardner 3c30e3cb20
Flutter Web Bootstrapping Improvements (#144434)
This makes several changes to flutter web app bootstrapping.
* The build now produces a `flutter_bootstrap.js` file.
  * By default, this file does the basic streamlined startup of a flutter app with the service worker settings and no user configuration.
  * The user can also put a `flutter_bootstrap.js` file in the `web` subdirectory 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 the `index.html` (with the exception of `{{flutter_bootstrap_js}}`, see below).
* Introduced a few new templating tokens for `index.html`:
  * `{{flutter_js}}` => inlines the entirety of `flutter.js`
  * `{{flutter_service_worker_version}}` => replaced directly by the service worker version. This can be used instead of the script that sets the `serviceWorkerVersion` local variable that we used to have by default.
  * `{{flutter_bootstrap_js}}` => inlines the entirety of `flutter_bootstrap.js` (this token obviously doesn't apply to `flutter_bootstrap.js` itself).
* Changed `IndexHtml` to be called `WebTemplate` instead, since it is used for more than just the index.html now.
* We now emit warnings at build time for certain deprecated flows:
  * Warn on the old service worker version pattern (i.e.`(const|var) serviceWorkerVersion = null`) and recommends using `{{flutter_service_worker_version}}` token instead
  * Warn on use of `FlutterLoader.loadEntrypoint` and recommend using `FlutterLoader.load` instead
  * Warn on manual loading of `flutter_service_worker.js`.
* The default `index.html` on `flutter create` now uses an async script tag with `flutter_bootstrap.js`.
2024-03-12 22:41:26 +00:00
..
flutter Update gold validator to check for regression in flutter-gold check (#145008) 2024-03-12 20:20:51 +00:00
flutter_driver Manually roll pub packages (#145005) 2024-03-12 19:53:57 +00:00
flutter_goldens Rename isAvailableForEnvironment to isForEnvironment (#143176) (#144858) 2024-03-10 06:20:38 +00:00
flutter_localizations Upgrade vm_service. (#144845) 2024-03-08 17:09:07 -08:00
flutter_test Reland "Fail tests on exceptions raised after test completed (#144706)" (#144980) 2024-03-12 18:17:10 +00:00
flutter_tools Flutter Web Bootstrapping Improvements (#144434) 2024-03-12 22:41:26 +00:00
flutter_web_plugins Upgrade vm_service. (#144845) 2024-03-08 17:09:07 -08:00
fuchsia_remote_debug_protocol Manually roll pub packages (#145005) 2024-03-12 19:53:57 +00:00
integration_test Manually roll pub packages (#145005) 2024-03-12 19:53:57 +00:00
analysis_options.yaml Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00