-
Notifications
You must be signed in to change notification settings - Fork 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
Rx.umd.js vs Rx.js vs AMD #1678
Comments
Publishing each module separately as AMD allows them to import only what they need, but honestly I question whether anyone really is (or will be) doing this. Nearly all AMD-supported modules are shipped as bundled UMD style these days. As far as globals vs AMD, again I'm not aware of any notable difference between just using the UMD. So 👍 from me unless jeff and rob know something we're missing. |
I'd like to chime in on this issue and the not so unrelated #1650. Over at https://github.com/facebook/nuclide we use Rx extensively. Nuclide is not a "web app" and doesn't have any kind of bundling. Our target environments are Atom (Electron) and Node. Currently we The perf considerations when requiring Rx change when you're no longer concerned about file size as much as you're concerned about the number of files. Startup speed is critical for us, not just on the Atom clients, but also the server (each client spins up a server process). After measuring, it turned out that it was much faster to Since Atom already ships with built-in transpiling, the ecosystem has largely evolved without using/needing bundling. When I saw #1650, I was delighted because it means that we can eventually switch to using the bundled version without the burden of a bundling step (or shipping a custom build of Rx). So back to the original issue. I doubt that anyone still using AMD modules is also using Rx. However, if someone is using require.js, with a little configuration they can interop with CommonJS – or no configuration at all if they use the bundled UMD version. What may be worth exploring, and I'm clearly biased, is friendlier ways to expose the UMD version. Like maybe making it reachable from the package root instead of the Just some thoughts. PS: Looking forward to a beta8 or stable release with "Rx exports all" so we can switch to it in prod. |
@zertosh thanks for all of that input. Can I summarize that as "Pro just umd output one file"? |
@Blesh yup! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When we first got the "global build" working a while ago, @jeffbcross and @robwormald took the job. The outcome is that we have an
Rx.js
andRx.umd.js
file (plus minified counterparts).Rx.umd.js
should just beRx.js
and the other version probably shouldn't exist. I'd like clarification on this separation from @jeffbcross or @robwormaldProposal
Rx.js
global build output.Rx.umd.js
global build output toRx.js
UMD
global output.Thoughts?
The text was updated successfully, but these errors were encountered: