Skip to content

Remove unused/ unnecessary babel-runtime dependency #76

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

Closed
wants to merge 1 commit into from
Closed

Remove unused/ unnecessary babel-runtime dependency #76

wants to merge 1 commit into from

Conversation

avindra
Copy link

@avindra avindra commented Feb 3, 2020

Similar fix to: react-component/drawer#121

Noticed this problem when I saw core-js 2.x being included in a dependency tree for an application I work on:

yarn why core-js
yarn why v1.16.0
[1/4] Why do we have the module "core-js"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "core-js"
info Reasons this module exists
   - Hoisted from "@babel#node#core-js"
   - Hoisted from "recharts#core-js"
   - Hoisted from "react-scripts#react-app-polyfill#core-js"
info Disk size without dependencies: "7.13MB"
info Disk size with unique dependencies: "7.13MB"
info Disk size with transitive dependencies: "7.13MB"
info Number of shared dependencies: 0
=> Found "babel-runtime#[email protected]"
info This module exists because "rc-drawer#rc-util#babel-runtime" depends on it.
info Disk size without dependencies: "7.68MB"
info Disk size with unique dependencies: "7.68MB"
info Disk size with transitive dependencies: "7.68MB"
info Number of shared dependencies: 0

Similar fix to: react-component/drawer#121

Noticed this problem when I saw `core-js` `2.x` being included in a dependency tree for an application I work on:

```
yarn why core-js
yarn why v1.16.0
[1/4] Why do we have the module "core-js"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "core-js"
info Reasons this module exists
   - Hoisted from "@babel#node#core-js"
   - Hoisted from "recharts#core-js"
   - Hoisted from "react-scripts#react-app-polyfill#core-js"
info Disk size without dependencies: "7.13MB"
info Disk size with unique dependencies: "7.13MB"
info Disk size with transitive dependencies: "7.13MB"
info Number of shared dependencies: 0
=> Found "babel-runtime#[email protected]"
info This module exists because "rc-drawer#rc-util#babel-runtime" depends on it.
info Disk size without dependencies: "7.68MB"
info Disk size with unique dependencies: "7.68MB"
info Disk size with transitive dependencies: "7.68MB"
info Number of shared dependencies: 0
```
@coveralls
Copy link

Coverage Status

Coverage remained the same at 23.422% when pulling 320b64c on avindra:patch-1 into a27f7f6 on react-component:master.

@avindra avindra changed the title Remove unnecessary babel-runtime dependency Remove unused/ unnecessary babel-runtime dependency Feb 9, 2020
@avindra avindra requested a review from yiminghe February 9, 2020 19:28
@kimyu-ng
Copy link

@afc163 can you take a look at this as this obsolete dependency is required by rc-trigger and rc-trigger is required rc-time-picker.

@avindra
Copy link
Author

avindra commented Feb 16, 2020

Should be safe to remove. The quick way to tell is that babel-runtime is only referenced in package.json (nowhere in build configurations, source code, or otherwise).

@avindra
Copy link
Author

avindra commented May 27, 2020

Looks like it was addressed in 0f54ab8#diff-b9cfc7f2cdf78a7f4b91a753d10865a2

and #91 by @zombieJ

So I'm closing this PR.

@avindra avindra closed this May 27, 2020
@avindra avindra deleted the patch-1 branch May 27, 2020 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants