Webpack and .babelrc

Hello Campers,

in some tutorials I saw that they use a .babelrc and webpack and in other tutorials they just use webpack.

What do .babelrc and when will I use what?

.babelrc is babel config file. You can keep the babel config either in webpack.config.js or keep it in its own file (the .babelrc file)

Here is how my .babelrc file usually looks like -

  "presets": ["es2015", "react"]

To look at more webpack/babel config options you can see my webpack boiler plate code.
Webpack Boilerplate