Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between babel-preset-env and @babel/preset-env

Tags:

babeljs

I have a hard time of understanding the difference between the two. Can someone explain why @babel/preset-env is more beneficial regarding to its targets?

like image 450
GoOlga Avatar asked Nov 20 '18 05:11

GoOlga


1 Answers

All packages prefixed with @ are part of the Babel 7 family. A few years ago, npm released their scoped packages feature that enables organisations to publish multiple libraries that all start with @insert_name_here, have a slash (/) in between and end with the library's name. Just like:

@babel/preset-env

Also, when they transitioned from version 6 to 7, they started to use a monorepo, which made it much easier to use the scoped packages feature.

like image 109
Paul Razvan Berg Avatar answered Oct 17 '22 11:10

Paul Razvan Berg