I was setting up Webpack for my React project and got confused between babel
, babel-core
, babel-loader
, babel-preset-2015
and babel-preset-react
. I know that Babel is needed to transform ES7 or ES6 code to ES5 but in my package.json
I have installed all these dependencies except Babel and they also as devDependencies
.
Can someone please explain what's the difference between all these and why all of them are needed for my project? Isn't there any single dependency to replace them all? And if they are so important, why are they included as devDependencies
?
babel
babel-core
before move on,
preset vs plugin :
babel-preset-es2015
babel-preset-react
babel-polyfill
babel-loader
devDependencies
Isn't there any single dependency to replace them all?
babel -> @babel