92

What is the difference between babel-core and @babel/core ?

Are they the same thing but different versions? If not so, when do you use one and when do you use the other?

Thank you.

1 Answer 1

100

Since Babel 7 the Babel team switched to scoped packages, so you now have to use @babel/core instead of babel-core.
But in essence, @babel/core is just a newer version of babel-core.

This is done to make a better distinction which packages are official and which are third-party.

2
  • do I need both of them or just the newer/older one?
    – mcmxc
    Jan 27, 2019 at 22:16
  • 7
    @mcmxc Since you want only one version of a certain dependency and @babel/core is v7 of babel-core, you should only install one of them (I would install @babel/core if it's a new dependency) Feb 1, 2019 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.