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

Immutable middleware is not being tree-shaken in production #363

Closed
markerikson opened this issue Feb 15, 2020 · 1 comment
Closed

Immutable middleware is not being tree-shaken in production #363

markerikson opened this issue Feb 15, 2020 · 1 comment
Milestone

Comments

@markerikson
Copy link
Collaborator

Per recent Twitter discussion with @mweststrate and @Andarist , it turns out all my attempts to ensure that redux-immutable-invariant-middleware isn't being included in prod builds... didn't work out:

https://twitter.com/acemarke/status/1228092154830098432

So, RTK users are currently getting an extra couple K in their prod bundles that shouldn't be there.

Per #78 , it seems that RISM doesn't shake right because it's not a proper module or something like that.

Looking at https://github.com/leoasis/redux-immutable-state-invariant , it hasn't been updated in 3 years. If I look at the author's Github profile, they're not entirely inactive, as there's a few one-off commits in the last few months, but the lack of activity on the repo suggests we're unlikely to be able to poke them and get an improved version published.

Given that, I'm planning to fork redux-immutable-state-invariant, copy it completely into the RTK codebase, and ensure that it's getting shaken properly in production.

Other related notes:

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

No branches or pull requests

1 participant