-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Moving ES6 module from react-router/es6 to /es is a breaking change #3333
Comments
Wait, what? Is there no equivalent of I'd really like for the details of the ES module build (e.g. where it sits) to be an implementation detail. The documented style of ES6 imports is to import from Is there some way to get webpack 2 users to resolve the main for this lib appropriately? I want to have good support for people using ES modules builds, but I really don't want the import to be anything other than |
@AaronFriel are you personally experiencing an issue? |
In the interest of not unnecessarily breaking users, we'll move the build back to I'm going to update the docs to explicitly warn users away from importing from this path. |
@ryanflorence: Yeah, it broke a project I'm working on and I came here trying to figure out why my imports were not working. :) It's not a huge issue, but it was a breaking change in the API. @taion: In case you haven't yet looked this up, it's currently optional in Webpack 2 (
So the webpack community seems reluctant to do anything by default, and I don't blame them. Someone needs to propose a good solution moving forward, and there do appear to be some. It seems like the simple answer is |
Neither importing from Separately, by convention, all code published to npm (outside of React Native) space is fully transpiled to run on ES5. For almost every library, everything that ends up in With very few exceptions, all of The issues of loaders is entirely orthogonal to the question of The only question is why to make the location of the build an implementation detail, because If you want things to work reliably going forward, and to be using the officially supported option, you're going to have to add |
@taion while I can hardly say for another project what is the public API, your docs did reference Re: |
I wrote that section of the docs. They mentioned the location of the ES module build as an implementation detail, then directed users specifically to use the To avoid confusion going forward, I've updated the docs to make it more clear that users should not reach into that subdirectory for the ES module build. Anyway, to avoid getting too far off topic, my plan here is to follow standards and conventions as much as they are available. To the extent that something official becomes available, we will use that – absent something more official, |
Reverted on v2.3.0. Still, it's strongly recommended not to import from |
A number of tutorials, starter kits, people's sites could be broken by this update. Here's what I could find with GitHub code search:
https://github.com/mrtnbroder/isomorphic-react-webpack-boilerplate/blob/master/src/client/index.jsx
https://github.com/fc-io/react-tape-redux/blob/master/app/containers/root.prod.js
https://github.com/nashdot/bandol/blob/master/tests/fixtures/core/module/actual.js
https://github.com/ModusCreateOrg/react-dynamic-route-loading-es6/blob/master/client/components/Toolbar/index.js
https://github.com/jaaberg/draft-js-workshop/blob/master/src/index.js
SemVer states that the major version must be updated for backwards incompatible changes to the public API. Not everyone uses rollup,
jsnext:main
is not a solution.The text was updated successfully, but these errors were encountered: