Answer the question
In order to leave comments, you need to log in
Error on async await?
Hello. When used in a method, acync throws an error
const logIn = async ( ) => {
console.log( 11 );
}
LogIn.vue?3e21:66 Uncaught ReferenceError: regeneratorRuntime is not defined
at eval (LogIn.vue?3e21:66)
at VueComponent.onSubmit (LogIn.vue?3e21:69)
at Proxy.boundFn (vue.esm.js?efeb :190)
at submit (LogIn.vue?6bb8:17)
at invoker (vue.esm.js?efeb:2004)
at HTMLFormElement.fn._withTask.fn._withTask (vue.esm.js?efeb:1802)
{
"presets": [
["env", { "modules": false } ],
"stage-3"
],
"plugins": ["syntax-dynamic-import"]
}
Answer the question
In order to leave comments, you need to log in
When working with webpack, I solved this problem
by installing babel-polyfill
in the webpack config
require('babel-polyfill');
module.exports = {
// BASE config
externals: {
paths: PATHS
},
entry: {
app: ['babel-polyfill', PATHS.src]
}, ...
Googled and found the
{
"presets": [
"es2017",
"stage-3"
],
"plugins": [ "syntax-dynamic-import" ]
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question