Skip to content
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

Remove tree-shaking possibility (broken) #1962

Merged
merged 1 commit into from Aug 28, 2023
Merged

Conversation

jdeniau
Copy link
Member

@jdeniau jdeniau commented Aug 28, 2023

Sadly reverting tree-shaking possibility (#1888) as it does break. Moreover, as nearly every collection type can be converted to another collection (Map().toList() for example), so nearly no code was removed.

I think that if we want to implement this, we might need to rethink this functionality.

@jdeniau jdeniau requested a review from bdurrer August 28, 2023 12:17
@jdeniau jdeniau force-pushed the jd-feat-rollbackSideEffects branch from 7c56806 to 339ef9e Compare August 28, 2023 12:19
@jdeniau jdeniau changed the title Improve Typescript definition for Map (#1841) Remove tree-shaking possibility (broken) Aug 28, 2023
@jdeniau
Copy link
Member Author

jdeniau commented Aug 28, 2023

@bdurrer I willl merge this quickly to make v5 functional, but I would really appreciate your opinion on this.

For the record the sideEffects I set was wrongly set to "./src/CollectionImpl.js" instead of "./dist/es/CollectionImpl.js"

Once you include CollectionImpl, then all .toXXX methods are implemented and the bundle size goes back to 17ko instead of 18ko (full bundle), so nearly no gain.
Even with the CollectionImpl as side effect, I had on issue on this code

image

where Collection is undefined.

@jdeniau jdeniau merged commit 9a430e2 into 5.x Aug 28, 2023
5 checks passed
@jdeniau jdeniau deleted the jd-feat-rollbackSideEffects branch August 28, 2023 12:24
This was referenced Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant