Skip to content

Move the undocumented assetBase meta tag API to flutter.js #122987

@jacobsimionato

Description

@jacobsimionato

Flutter allows you to customize the location that assets will be loaded from by adding a tag like:

<meta name="assetBase" content="path/to/my/flutter/assets">

See the logic here: https://github.com/flutter/engine/blob/170cbea98cefa9e3a59e58286a68028b35b3635d/lib/web_ui/lib/src/engine/assets.dart#L45

If this tag isn't supplied, assets are loaded relative to the regular base URL.

I haven't actually found documentation for this anywhere.

I think configuration of the assetBase would be better moved to a parameter of the loadEntrypoint method as part of the flutter.js initialization process (see https://docs.flutter.dev/development/platform-integration/web/initialization). This would make it much easier for Google apps to figure out how to initialize Flutter properly. We rely on this, so the change would have to be non-breaking e.g. by using the loadEntrypoint value, else the meta tag value, else empty string.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listcustomer: googleVarious Google teamsplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions