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 invariant in favor of doing NODE_ENV checks directly #1472

Merged
merged 1 commit into from
Nov 23, 2019

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Nov 23, 2019

Relates to #1470

Removes tiny (but distributes solely in CJS format and thus deoptimizing) dependency. It also follows suit of facebook/react#16753 - this should be more approachable to newcomers, because invariant is a little bit quirky - in example I often found myself wondering if I should use passing or failing condition when working with various OSS projects using this pattern. This change makes it easier to immediately know how this works.

This only helps webpack as Rollup is smart enough to remove this dependency on its own. Results on my playground:

Rolluped:
    3330
Rolluped & uglified:
    2388
Webpacked:
-   3294
+   3071

@netlify
Copy link

netlify bot commented Nov 23, 2019

Deploy preview for react-redux-docs ready!

Built with commit 0dbb654

https://deploy-preview-1472--react-redux-docs.netlify.com

@timdorr
Copy link
Member

timdorr commented Nov 23, 2019

Thanks!

@timdorr timdorr merged commit 9ebd1a9 into reduxjs:master Nov 23, 2019
albertodev7 pushed a commit to albertodev7/react-redux that referenced this pull request Dec 8, 2022
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.

2 participants