Skip to content

Report unused standalone imports #46766

Closed

Description

@Lonli-Lokli

Which @angular/* package(s) are relevant/related to the feature request?

common

Description

With the popularity of standalone components (pipes/directives), powered by Angular as well, there is a possibility that some components will be unused in templates while still imported by parent component, and so will increase bundle

Proposed solution

Report during the build that some.pipe/directive is imported but not used.
It can be controlled via angulqrCompilerOptions of tsconfig

Alternatives considered

Nothing

Activity

  1. pkozlowski-opensource commented on Jul 9, 2022

    @pkozlowski-opensource
    Member

    It is in the works :-)

  2. added
    area: common
    on Jul 11, 2022
  3. added this to the needsTriage milestone on Jul 11, 2022
  4. added
    area: core
    cross-cutting: standalone
    and removed
    area: common
    on Jul 12, 2022
  5. added
    feature
    area: language-service
    on Sep 28, 2022
  6. modified the milestones: needsTriage, Backlog on Sep 28, 2022
  7. angular-robot commented on Sep 28, 2022

    @angular-robot
    Contributor

    Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

    Find more details about Angular's feature request process in our documentation.

  8. angular-robot commented on Oct 17, 2022

    @angular-robot
    Contributor

    Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

    We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

    You can find more details about the feature request process in our documentation.

  9. 27 remaining items

  10. clem4net commented on Jun 24, 2024

    @clem4net

    I think this is an important feature for projects.
    It does not necessarily need to be in simple compilation (to maintain performance) => This could be an option or an specific command.

  11. t-mish commented on Jul 24, 2024

    @t-mish
  12. self-assigned this
    on Aug 30, 2024
  13. added a commit that references this issue on Sep 3, 2024
    a2e4ee0
  14. angular-automatic-lock-bot commented on Oct 4, 2024

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

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

Metadata

Metadata

Assignees

Labels

area: corearea: language-servicecore: directive matchingcross-cutting: standalonefeaturefeature: under consideration

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions