redux-connect
redux-connect copied to clipboard
Force the consumer to provide a polyfilled environment.
This allows people that are using polyfill.io to not ship additional unneeded polyfills such as Promises polyfills.
If you're interested in merging this, I can add a mention of this to the README.
This is an interesting change, but its not possible for many users to rely on external polyfilling, for instance, when SSR is primary use-case. What I would do is possibly release this under a specific tag or version, which, in turn, would allow users to choose what they want to use. Please add extra information in readme for both server and client sides, and I will work on a release script for creating multiple bundles
Ok, until Monday I will do this.
@ruiaraujo any progress on that?
Nope, I will try to find the time today.
@AVVS I was reading your comment to amend the README files, and I don't understand why many user can't rely on external polyfilling for the SSR user case. Node supports promise since 0.12.
@ruiaraujo - idea is to have identical code for node & server-side. Furthermore, many companies do not allow link to external sources, since its a security risk. By forcing people to do one thing - we essentially shut off the others. Therefore, it has to be optional and it has to provide a clear readme on how to use it
But if the users are using something babel polyfill, it stills provides a polyfilled environment. You don't need to load external resources. I moved the polyfill to that outside service because I already required it for the Intl polyfill. But I could also (and I did) just use it in my internal sources.
The only difference would be if redux-connect provided an UMD build which it doesn't. So for the server section there is no need to mention anything unless you plan to support node 0.10 and I will a add a section to the client side on how to polyfill Promises.
But if the users are using something babel polyfill, it stills provides a polyfilled environment. You don't need to load external resources. I moved the polyfill to that outside service because I already required it for the Intl polyfill. But I could also (and I did) just use it in my internal sources.
Thats not true, because it can provide different environments by using different transforms on client and server, while the code is exactly the same. Thats why I want you to have this being mentioned on the server-side as well
so, this is still pretty interesting, any effort to document it?
I must admit that I am not sure what we need to document for the server part. Once I will do understand it, I will do it for both.