DEV Community

Discussion on: 10 useless NPM Package with millions of downloads

Collapse
 
ansile profile image
Ansile

Actually, that is wrong. Babel by itself cannot transform prototype methods. That would require type information, which babel does not have. For example, a.includes(b) could be a call to an array method, or a method of your own Collection class (e.g. mobx ObservableArray).

And while babel turns language syntax into pre-es6, you still require polyfills.

You can get them all in a 'bulk' by importing from corejs, but it's a different story.