redux
redux copied to clipboard
Update build tooling to target modern environments
I'd like to see if we can start applying the principles from "ship modern JS" at https://web.dev/publish-modern-javascript/ . In particular, https://web.dev/publish-modern-javascript/#modern-with-legacy-fallback-and-esm-bundler-optimizations looks like the combo of settings we would want to use .
This is something we ought to try to get into 4.1 if possible.
It looks like defining an exports
field is considered a breaking change due to messing up Node usage. So, we should hold off on that.
I would like to see if I can at least move all of our build artifacts into dist
. In theory that shouldn't be breaking because they should all be getting looked up via the appropriate package.json
fields. The main thing would be to keep the dist/redux.min.js
filename the same, because I see uses of that publicly via Unpkg:
https://stackoverflow.com/questions/60731097/use-redux-without-npm
Any reason conditional exports wouldn't work for Node usage without breaking existing? https://nodejs.org/api/packages.html#packages_conditional_exports
Recently ran into an issue where a package I'm consuming in Node as ESM imports redux which then breaks because Node cannot resolve redux as an ESM
I dunno :) I barely know enough about this topic as it is, and I just remember someone telling me that "adding an exports
field is considered a breaking change that requires a major". I haven't had time to do more research on the topic.
Oh hey this is finally done as of the 5.0 alphas!