Skip to content

fix(cdk/drag-drop): make item and list easier to tree shake#32604

Merged
crisbeto merged 1 commit intoangular:mainfrom
crisbeto:tree-shake-drag-drop
Jan 5, 2026
Merged

fix(cdk/drag-drop): make item and list easier to tree shake#32604
crisbeto merged 1 commit intoangular:mainfrom
crisbeto:tree-shake-drag-drop

Conversation

@crisbeto
Copy link
Member

Currently we have the DragDrop service that creates the DragRef and DropListRef which contain most of the implementation for the directives. The problem is that by going through the service, we can't tree shake the list if the app is only using the item. These changes move the creation into separate functions.

Currently we have the `DragDrop` service that creates the `DragRef` and `DropListRef` which contain most of the implementation for the directives. The problem is that by going through the service, we can't tree shake the list if the app is only using the item. These changes move the creation into separate functions.
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Dec 29, 2025
@pullapprove pullapprove bot requested review from adolgachev and ok7sai December 29, 2025 08:18
@crisbeto crisbeto removed the request for review from adolgachev December 29, 2025 08:56
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Dec 29, 2025
@crisbeto crisbeto merged commit 1f34b94 into angular:main Jan 5, 2026
30 checks passed
@crisbeto
Copy link
Member Author

crisbeto commented Jan 5, 2026

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto added a commit that referenced this pull request Jan 5, 2026
Currently we have the `DragDrop` service that creates the `DragRef` and `DropListRef` which contain most of the implementation for the directives. The problem is that by going through the service, we can't tree shake the list if the app is only using the item. These changes move the creation into separate functions.

(cherry picked from commit 1f34b94)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: cdk/drag-drop target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants