Skip to content

[web] Emit build precache manifest for custom service workers and PWAs (--web-content-hash) #191916

Closed

Description

@kevmoo

Summary

Part of umbrella issue #149031.

Following the deprecation and removal of default built-in service worker generation (#156910), provide first-party build metadata and loader hooks to enable developers to build custom service workers and offline PWAs with content-hashed assets.

Scope & Requirements

  • Output a machine-readable Bill of Materials manifest (precache_manifest.json or flutter_assets_manifest.json) in build/web/ listing all output filenames and their content hashes during flutter build web --web-content-hash.
  • Enable tools like Workbox CLI or custom build scripts to ingest the manifest directly without fragile file-globbing scripts.
  • Provide clean serviceWorker: { scriptUrl: 'custom_sw.js' } configuration hooks in flutter_bootstrap.js to register and activate custom service workers before the Flutter engine starts.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-webWeb applications specifically
    P3Issues that are less important to the Flutter project
    team-webOwned by Web platform team
    on Aug 27, 2026
  2. added a commit that references this issue on Sep 18, 2026
    f2d9b59
  3. github-actions commented on Oct 5, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions