You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mosuem Suggested we could avoid running the build (and link) hooks for packages that are listed as dependencies in the pubspec but that are not actually used.
In JIT: actually not used: 0 imports
in AOT: actually not used: after tree-shaking
Secondly, build hooks might depend on other build hooks (their metadata). So a build hook must also be run if another build hook that is run has in the package pubspec the other package. (I don't know how many hooks we might be able to skip if we also need to take this into account.)
If we discover the program code and no other hooks in practice depend on a build hook we should be able to skip it.
We cannot skip anything when hot-reload or hot-restart is enabled, because code using an asset might be added.