Conversation
This build is intended for users who want to use Redux in a browser with ES modules support. The build removes all references to `process` by assuming it is in a production environment. Additionally, it does not transpile, as all browsers that have ES modules support also support ES2015+
|
Hey Tim, it's Tim 😄 I'm wondering if we can keep this in the What happens with |
|
Hey! Yes that should be possible. Let me take a look on how to configure rollup for that. Because ES modules are scoped, |
|
@timdorr Updated, PTAL 😄 |
|
I'm actually mucking about with the babel and rollup configs right now. I'll have a conflict ready for you in just a second... |
|
@timdorr Conflict should be busted 🎉 |
|
Hm, let me actually minify just like the minified umd build. |
|
Cool. I renamed it to just redux.mjs for simplicity. Forgot about that extension. |
|
Thanks for the quick review @timdorr ! Can't wait for the next release 🎉 |
|
@timdorr What is the ETA of a release of a new version of Redux which includes this PR? |
|
According to ES modules support taken from here - https://github.com/babel/babel/blob/6b8261bbb7ebb8d2980cb30c3b3369678fd99835/packages/babel-preset-env/data/built-in-modules.json#L1-L11 and testing only desktop browsers quickly it seems that used object rest spread syntax in the es/redux.mjs is not supported in those verstions of Edge & Safari. Depending on what the audience of this bundle is it might need to get adjusted. |
This build is intended for users who want to use Redux in a browser with ES modules support. The build removes all references to
processby assuming it is in a production environment.Additionally, it does not transpile, as all browsers that have ES modules support also support ES2015+
This approach is similar to the one of Vue (vuejs/vue#7110) which I have also been using with success.
Fixes #2907