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

Is @babel/core unused and can it be removed? #189

Open
cobaltt7 opened this issue Oct 26, 2024 · 2 comments · May be fixed by #191
Open

Is @babel/core unused and can it be removed? #189

cobaltt7 opened this issue Oct 26, 2024 · 2 comments · May be fixed by #191
Assignees

Comments

@cobaltt7
Copy link

cobaltt7 commented Oct 26, 2024

Your Environment

  • Prettier version: 3.3.3
  • node version: 22.10.0
  • package manager: npm@9
  • IDE: VSCode

Describe the bug

@babel/core does not seem to be used at all in the package, and I believe it is unnecessarily adding 21MB / 20 dependencies to the bundle. See the package's dependency graph with and without @babel/core.
I am unfamiliar with Babel, so I apologize if just having it installed is doing something behind the scenes. If not, could @babel/core be removed?

@cobaltt7 cobaltt7 changed the title Can unused dependencies be removed? Is @babel/core unused and can it be removed? Oct 26, 2024
@IanVS
Copy link
Owner

IanVS commented Oct 29, 2024

Good callout. I think this is a holdover from the upstream we forked from. We get the parser from @babel/parser instead of @babel/core, so I believe you're right that we can remove the dependency. Would you like to submit a PR and we can try it out?

@IanVS IanVS linked a pull request Oct 31, 2024 that will close this issue
@cobaltt7
Copy link
Author

Thanks for addressing this! Sorry I wasn't able to make a PR, I've been busy.

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 a pull request may close this issue.

2 participants