Skip to content

Remove @babel/core from babel-preset-react-app dependencies #8428

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Feb 5, 2020

It's not a dependency of babel-preset-react-app - it's not used anywhere inside it. Potentially it could be set as a peer dependency - just for information purposes, but not sure if you want that. It definitely ain't a hard dependency though.

@stale
Copy link

stale bot commented Mar 6, 2020

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Mar 6, 2020
@Andarist
Copy link
Contributor Author

Andarist commented Mar 7, 2020

I believe the PR is still sound so bumping for the stale bot.

@stale stale bot removed the stale label Mar 7, 2020
@ianschmitz ianschmitz added this to the 3.4.1 milestone Mar 10, 2020
@ianschmitz
Copy link
Contributor

@ianschmitz ianschmitz self-requested a review March 10, 2020 17:33
@Andarist
Copy link
Contributor Author

If you want to keep @babel/core as hard dependency then you might want to move it to react-scripts or something and make @babel/core a peer of babel-preset-react-app.

Right now it being a hard dependency of babel-preset-react-app doesn't make sense - it's never required by the babel-preset-react-app. The @babel/core is always provided externally by the caller to your preset so any version used as a hard dependency of your preset is just hiding a potential issue as that version won't ever actually be used (unless hoisted, but that makes it only working by accident).

@ianschmitz
Copy link
Contributor

We do have it in react-scripts already. I agree we should change it to a peer dep though. It would make sense to follow official babel preset packages convention: https://github.com/babel/babel/blob/master/packages/babel-preset-react/package.json

@iansu iansu modified the milestones: 3.4.1, 3.4.2 Mar 20, 2020
@ianschmitz ianschmitz modified the milestones: 3.5, 4.0 May 3, 2020
@iansu iansu modified the milestones: 4.0, 4.1 Jul 22, 2020
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