I set up my project with the full webpack template. How do I set it up to use ES7 features like async functions? I read about using babel plugins and tried the following:
{
test: /\.js$/,
include: [resolve('src'), resolve('test')],
use: {
loader: 'babel-loader',
options: {
plugins: [require("babel-plugin-transform-async-to-generator")]
}
}
}
From my understanding: This won't transpile the async function in .vue
files because it only looks for the .js
files.
Somehow it works for these - but then it gives me arrow functions which don't work in IE again.
To wrap it up: How can I set up transpiling to use ES6 and ES7 features?