as the name implies, mainly according to the docs, with the new Babel 6 we now have to pass plugins / presets, since by default it will not do anything with our code.
So, I created a .babelrc file in the project directory with the following (as in the docs)
{ "presets": ["es2015"] }
However, this will not work. Since I use webpack and babel-loader, I came across another answer that suggested putting something like this in the webpack configuration:
{ test: /\.js$/, exclude: /node_modules/, loader: "babel", query: { presets: ["es2015"] } }
And it works. So my question is, is this a mistake in the new Babel or is there something clearly wrong that I was missing? I used to use Babel 5 and Webpack, and I was able to specify the babel configuration in .babelrc without any problems ...
Thank you in advance
EDIT: The problem only occurs when the eslint boot loader starts before the boot loader. However, just upgraded to the latest babel-loader 6.2.0, and everything works again.
module: { preLoaders: [ { test: /\.js$/, exclude: /node_modules/, loader: "eslint"} ], loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: "babel"}, { test: /\.css$/, exclude: /node_modules/, loader: "style!css!postcss"}