-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
(fix) bundle-size: reuse ts helper functions from tslib instead of in… #13350
(fix) bundle-size: reuse ts helper functions from tslib instead of in… #13350
Conversation
f8dab9b
to
b0ffcd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. The CLI actually also generates code that depends on tslib
. Any project that just pulls @theia/cli
without pulling @theia/core
will break with this change. So you need to add the dependency there as well.
b0ffcd8
to
c245f6d
Compare
@xcariba FYI, it's not only Alternatively, we could think about only using this in a few selected packages that are guaranteed to get pulled like |
Personally I would prefer having a clean dependency in each package. The additional effort is really minimal, because if we need to update all versions then a simple search-replace will do. I'm not sure whether it's of practical relevance but not declaring the dependency in each package could lead to weird errors. For example a "random" |
@sdirix Yeah, I can see that. I think the maintenance overhead is negligible and it probably makes sense to prevent weird dependency resolving errors. |
@sdirix @msujew In case of /packages/ we want to ensure that tslib is present in node_modules at the time of bunlding the app. |
Hi @Alexander-Taran, The error case described above is also relevant for the dev-packages. Dev packages like If only Even if that would not be a use case: All published packages should have the correct set of dependencies as we can never predict what consumers will do with them. |
@sdirix that's exactly what I meant in my comment to my original PR. That we (our team) don't know weather dev-packages need this dependency. And if so - which ones do. |
@Alexander-Taran Once you start setting the |
c245f6d
to
093cd01
Compare
💤 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Can you rebase so we can merge this?
@xcariba is in process |
…lining Signed-off-by: Alexander Kozinko <xcariba@gmail.com>
093cd01
to
27cdbc8
Compare
What it does
Fixes #13345
Reuses ts helper functions from tslib instead of inlining
How to test
Build master, check its size, build this branch, size will be smaller
Follow-ups
none
Review checklist
Reminder for reviewers