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

Make react-intl optional #61

Open
s7dhansh opened this issue Jun 1, 2017 · 9 comments
Open

Make react-intl optional #61

s7dhansh opened this issue Jun 1, 2017 · 9 comments

Comments

@s7dhansh
Copy link

s7dhansh commented Jun 1, 2017

Is there a proper way to do it? From the looks of it, it seems embedded deep in the code. I can easily remove i18n but not react-intl/react-intl-redux

Basically with Meteor 1.5, bundle-visualizer shows intl packages to be taking almost 59% (1.4mb) of a small app.

I also saw https://ssrwpo.github.io/ssr/i8n/ but to no fruitful avail.

@PEM--
Copy link
Member

PEM-- commented Jun 1, 2017

Nice found. A PR would be great. I'm changing the title to a less confusing meaning as this is the develop branch.

@PEM-- PEM-- changed the title Removing react-intl causes an error Make react-intl optional Jun 1, 2017
@s7dhansh
Copy link
Author

s7dhansh commented Jun 1, 2017

Will try. But I am not familiar with the code-base at all. Some basic pointers would be helpful. As in why do you use it (what kind of messages and at what steps).

From the code, I feel just changing the Provider to be taken from react-redux instead pf react-intl-redux should do the trick. The other intl related files are the reducers and actions, which appear to be harmless. Though, we should make them optional somehow.

@cbilotta
Copy link
Member

cbilotta commented Jun 1, 2017

Can you give me an email address so I can invite you to slack

@s7dhansh
Copy link
Author

s7dhansh commented Jun 1, 2017

sudhansh AT gmail

@cbilotta
Copy link
Member

cbilotta commented Jun 2, 2017

Have you received my invitation ?
Use it for basically anything - But try to talk in private if you get caught up in needing explanations instead of spamming the general channel :)

@s7dhansh
Copy link
Author

s7dhansh commented Jun 2, 2017

Yes I have. Thank you. I will try to get my doubts cleared on Monday. Weekends are quite hectic for me :)

@sakulstra
Copy link

@s7dhansh is there any progress on this? can i somehow help? - i tried your simple approach (replacing the provider) and for me it seems to work (but i'm not sure if it won't break for intl users)

@s7dhansh
Copy link
Author

s7dhansh commented Jul 6, 2017

@sakulstra Sorry no. I did not get enough time to do this. For now I use my own fork where I just remove everything. Not ideal, just works for me now as I do not need intl.
You may get cues here https://github.com/settlin/ssr/tree/settlin.

@cbilotta
Copy link
Member

Updates on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants