Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add sideEffects false to package json to allow tree shaking #1097

Merged
merged 1 commit into from
Apr 27, 2020
Merged

Add sideEffects false to package json to allow tree shaking #1097

merged 1 commit into from
Apr 27, 2020

Conversation

kenny-f
Copy link
Contributor

@kenny-f kenny-f commented Apr 23, 2020

Noticed that all the exports were being included output bundles even though only a few were used.

This pr adds sideEffects: false to the package.json so that bundlers like webpack can tree shaking unused code.

BEFORE:
Screenshot 2020-04-23 at 09 01 17

AFTER:
Screenshot 2020-04-23 at 09 21 17

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.327% when pulling aefe8b7 on kenny-f:side-effects-false into 6da1705 on i18next:master.

@jamuhl jamuhl merged commit 147baa4 into i18next:master Apr 27, 2020
@jamuhl
Copy link
Member

jamuhl commented Apr 27, 2020

sorry took a little longer. published in react-i18next@11.4.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants