-
-
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
Build umd with rollup #2283
Build umd with rollup #2283
Conversation
40 461 b -> 27 793 b |
CI seems to fail because of ES3ify check. |
Nice catch. symbol-observable has only |
That is the way Babel 6 handles // foo.js
const foo = {baz: 42, bar: false}
export default foo
// bar.js
import {baz} from './foo' // <-- Not allowed! That is against the spec (though it may have changed since 6.0.0), so they "broke" that behavior to fix the spec. Hence, all defaults are exported in the |
Right, but if we're bundling with rollup, we need to let it handle ES modules instead of Babel. So we should change the rollup env to not do the commonjs transform. |
@TrySound Can you post resulting bundles as gists for comparison? |
BTW, we're down to:
👍 Here's the latest build artifacts for easy perusal: https://gist.github.com/timdorr/73a8d368c1d0c3d3c83aa73af8f02cbe As compared to before: https://unpkg.com/redux@3.6.0/dist/redux.js |
LGTM. Most of the cost savings are from the babel import/export transforms and the inter-module imports ( |
This part worries me a little. Does it inline in prod build? |
Yeah. This increases bundle. Weird behavior. |
Could be #2244, I'm not sure if it was fixed yet in master. |
Now:
Keep going! |
@gaearon Yeah. Current min release is smaller because of that thing. Inference with code elimination is too hard :) That PR should be reverted. |
I'll merge it in here and then merge in this PR. The reason for #2030 are something you can fix with tooling. |
Do you guys want to release it as 3.* or 4.*? |
@TrySound Can you enable contributor pushing to your branch? Should be a checkbox at the top of the PR. |
Once I can push it, reverting that takes us down to:
Now we're cooking. |
Yay! @timdorr It's enabled. |
Cool, I think we're good. This doesn't change anything outside of the UMD build and does so in entirely a compatible way, so I think it only needs a patch version. Correct me if I'm wrong, otherwise I'll push this as 3.6.1. I don't believe we've had any other non-docs/examples updates since that release. |
It's probably safe as a patch. Maybe as a minor for a tiny bit of extra safety. |
Okay. I just would like to remove |
Go ahead and do that against the AFAIK, webpack is following suit, so that should be a low-impact breaking change for most folks. |
BTW, thanks for the hustle on this! |
* Build umd with rollup * Resolve jsnext entry in symbol-observable * Remove useless commonjs * Don't try to handle a missing process.env
Ref #2245