Skip to content

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

Open
Andarist wants to merge 2 commits into
react:mainfrom
Andarist:remove-babel-core-from-preset-deps
Open

Remove @babel/core from babel-preset-react-app dependencies#8428
Andarist wants to merge 2 commits into
react:mainfrom
Andarist:remove-babel-core-from-preset-deps

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

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

staleBot commented Mar 6, 2020

Copy link
Copy Markdown

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.

@stalestaleBot added the stale label Mar 6, 2020
@Andarist

Copy link
Copy Markdown
ContributorAuthor

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

@stalestaleBot removed the stale label Mar 7, 2020
@ianschmitzianschmitz added this to the 3.4.1 milestone Mar 10, 2020
@ianschmitz

Copy link
Copy Markdown
Contributor

@ianschmitz
ianschmitz self-requested a review March 10, 2020 17:33
@Andarist

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
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

@iansuiansu modified the milestones: 3.4.1, 3.4.2Mar 20, 2020
@ianschmitzianschmitz modified the milestones: 3.5, 4.0May 3, 2020
@iansuiansu modified the milestones: 4.0, 4.1Jul 22, 2020
Sign up for freeto 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

@Andarist@ianschmitz@iansu@facebook-github-bot