-
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
refactor: rename util back to make injection token #903
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @davidlj95 and the rest of your teammates on |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #903 +/- ##
=======================================
Coverage 99.46% 99.46%
=======================================
Files 79 79
Lines 372 372
Branches 73 73
=======================================
Hits 370 370
Partials 2 2 ☔ View full report in Codecov by Sentry. |
📦 Bundle size (Angular v17)Git ref:
|
📦 Bundle size (Angular v15)Git ref:
|
📦 Bundle size (Angular v18)Git ref:
|
📦 Bundle size (Angular v16)Git ref:
|
🎉 This PR is included in version 1.0.0-beta.17 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue or need
After trying to use the refactored util in #901 to create lazy injection tokens in #902, found out that injection tokens weren't removed from the main bundle if unused.
Which indeed makes sense. As now those lazy injection tokens are created by calling a function (
_lazyInjectionToken
). A function call isn't tree shakeable 🤦Proposed changes
Reverting changes in #901 . Will add
() =>
around when creating lazy injection tokens.Keeping the lazy injection token type as I think it's good that it's there and documented.
Quick reminders