Skip to content
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

Avoid bundling in ponyfill for Object.assign in use-subscription package #17259

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Nov 4, 2019

I've noticed that distributed use-subscription contained code object-assign's code. As you keep it external in case of other packages it makes sense to do the same here.

Just adding it as a dependency in package.json fixes the problem because your Rollup scripts read that and put those into externals option.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 4, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2b4cfe6:

Sandbox Source
interesting-dew-7l1h4 Configuration

@sizebot
Copy link

sizebot commented Nov 4, 2019

Size changes (stable)

Details of bundled changes.

Comparing: f4148b2...2b4cfe6

use-subscription

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
use-subscription.production.min.js -49.6% -46.0% 1.71 KB 884 B 921 B 497 B NODE_PROD
use-subscription.development.js -28.8% -28.4% 7 KB 4.99 KB 2.73 KB 1.95 KB NODE_DEV

Generated by 🚫 dangerJS against 2b4cfe6

@sizebot
Copy link

sizebot commented Nov 4, 2019

Size changes (experimental)

Details of bundled changes.

Comparing: f4148b2...2b4cfe6

use-subscription

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
use-subscription.development.js -28.7% -28.2% 7.01 KB 5 KB 2.73 KB 1.96 KB NODE_DEV
use-subscription.production.min.js -49.2% -45.6% 1.73 KB 897 B 930 B 506 B NODE_PROD

Generated by 🚫 dangerJS against 2b4cfe6

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess this makes sense, since React is already pulling in this dep!

@bvaughn bvaughn merged commit 62ef250 into facebook:master Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants