Skip to content

hook/link.dart consume data assets from pubspec.yaml #146265

Description

@dcharkes

After #146263 and #146264 have landed, we could consider sending existing flutter data assets to link hooks:

# pubspec.yaml of my_app
...
flutter:
...
  assets:
    - path: assets/translations.json
      link: messages # invokes package:messages' hook/link.dart to shrink  assets/translations.json

Alternatively, we could tell users that if they would like their assets to be tree shaken by a link hook, they must use a build hook to report them.

Somewhat similar behavior to

Related umbrella issues:

cc @mosuem @andrewkolos @christopherfujino

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-toolOwned by Flutter Tool team
    on Apr 4, 2024
  2. added
    P2Important issues not at the top of the work list
    triaged-toolTriaged by Flutter Tool team
    on Apr 4, 2024
  3. added
    tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.
    on Jul 11, 2025
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

    P2Important issues not at the top of the work listteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions