-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Explore using Rollup for UMD builds #928
Comments
👎 |
More details on 👎 ? |
[sentence redacted by @gaearon] By moving away from webpack, the community splinters again instead of empowering them to help get webpack 2 out. Jumping ship every few months doesn't enforce the perception of stability in the library. |
@phated Feel free to @ me in your personal attacks. Surely we should be discussing the technical merit of the two approaches? |
@Rich-Harris @gaearon posted on twitter about a cool new thing in webpack, you jumped in pushing your own stuff. According to https://github.com/webpack/webpack/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+rich-harris+ - you've never once contributed to the project. Technology isn't the only thing that matters, as a whole community has built up around React/Rackt/Redux. I've said my peace and have no more time to argue with you. |
Different approaches have different merits. Some new approaches may be difficult to implement on top of an existing project, but easier to implement from the ground up. By the same argument, Redux shouldn't have been made, and Flux should have been improved instead. Whether something is different enough that it “deserves” to be a separate thing over splitting a community is always a subjective question, and especially so when the project is young. Regardless of this, personal attacks are not allowed here. I redacted the part of @phated's comment that contained a personal attack, and we won't tolerate more of them. Even the community discussions can be respectful and polite, no need for extra emotions. |
I'll lock this thread for a couple of days for emotions to cool down, but I'm still interested in experiments with this. Nobody proposes to “jump the ship”—we're talking about a specific task (producing a readable ES5 output) that neither Webpack nor Babel currently handle well. |
One of the things I dig about webpack is its I'm adding support in lodash-es for simplfied requiring via: import {chunk, zipObject} from 'lodash-es' which would only require I think webpack 2 will have tree shaking as well so it's something to consider. |
Yep, I'm also interested in trying Webpack 2 separately. |
I get that a lot 😀 I wrote down a few notes on why Rollup is a separate project: rollup/rollup#219 (comment) |
From the sidelines - Regarding the points above, Rollup doesn't seem like it'd be helpful for making a CJS module build, since it's just a bundler. It's worth considering making a separate ES6 module build, though, since they're rather nicer to work with (matters more for larger libraries). Practically I think it'd be best to wait until webpack 2 is released before choosing between webpack and rollup. I'm very happy with the current "everybody uses webpack" equilibrium in the React community, because it makes it easy to understand the build pipeline on a variety of different projects quickly. It'd be a shame to give that up. |
@gaearon Are there any plans to make |
Redux works fine with Rollup for users. It even exports a fully ES-module-ified build. This issue is about building the Redux distributable JS bundles with Rollup instead of with webpack. |
Sorry, I had this issue with redux using rollup … and thought it was related. Thanks for clarifying @taion |
@timdorr What's the resolution here? Is the thought that the benefits of Rollup are not worth the cost of adding more tooling for now? |
Yeah, that's basically it. Nothing is really happening here too, so it seems like there isn't much interest in this right now. It's basically a bunch of bikeshedding to save a few bytes and make our UMD builds a little more pretty (which doesn't matter because it all gets ugly when you uglify it). |
That makes sense. For future clarity, if someone were to contribute a PR to add this, would you expect to reject that PR? |
Not necessarily. I'm not ruling it out completely. But webpack is 4-5x as popular as Rollup, so we would want to make sure we're not black boxing our build toolchain for a significant number of users such that future updates don't have a cheerleader and we don't start closing things with "Well, I don't know why it works, but it works!" |
@timdorr Everything is working so far for me with Rollup (after they patched their plugin I ref'd here). |
Our compiled code isn't looking nice because of all the junk code generated by Babel for ES6 modules:
https://cdnjs.cloudflare.com/ajax/libs/redux/3.0.3/redux.js
While this is not technically an issue, it would be nice to get a neater compiled output.
Maybe we can explore using Rollup for this.
./lib/
) and UMD (./dist/
) builds with Rollup insteadIf somebody wants to explore this feel free to.
The text was updated successfully, but these errors were encountered: