I am using webpack-simple template with following configurations:
package.json
{
\"name\": \"vue-wp-simple\",
\"description\":
Sohail's solution works. I had an async function, which ended up throwing the error...
To be sure, I used the vue-cli to build my project. As such, I have a vue.config.js, which on compile time injects content into webpack.config.
(Info on that can be found here)
So, in vue.config.js I have the following:
module.exports = {
configureWebpack: {
entry: ['@babel/polyfill', './src/main.ts'],
plugins: [
]
},
chainWebpack: config => {
config.resolve.alias.set('@image', path.resolve(__dirname, 'public/img'));
config.resolve.alias.set('@dev', path.resolve(__dirname, 'dev-server'));
},
}
Then, in babel.config.js I have this:
module.exports = {
presets: [
'@babel/env',
],
plugins: [
"transform-regenerator"
],
}
I hope this helps!