Skip to content

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

@dcharkes

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

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