-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: use pure annotations for tree shaking #1043
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1043 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 89 89
Lines 389 389
Branches 49 49
=========================================
Hits 389 389 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
📦 Bundle size (Angular v18)Git ref:
Base size data is not available yet. Try again when the CI/CD has finished running on main branch |
📦 Bundle size (Angular v15)Git ref:
Base size data is not available yet. Try again when the CI/CD has finished running on main branch |
📦 Bundle size (Angular v17)Git ref:
Base size data is not available yet. Try again when the CI/CD has finished running on main branch |
📦 Bundle size (Angular v16)Git ref:
Base size data is not available yet. Try again when the CI/CD has finished running on main branch |
🎉 This PR is included in version 1.0.0-beta.34 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue or need
After seeing a pure annotation to
RouterTitleKey
symbol in Angular's router package, the use of pure annotations has given me several ideas:const
sApplying here the pure annotation when possible to improve tree shaking
Proposed changes
Use pure annotation to tree shake:
ANGULAR_ROUTER_URL
symbol if unused. It's the only symbol used aroundReviewed the API report and nothing else seems to bee applicable for optimizations using pure annotations.
Tested that the symbol is not in production bundle when removing its usage in example app + not providing
withBaseUrl
Quick reminders