using async/await with webpack-simple configuration throwing error: RegeneratorRuntime not defined

后端 未结 4 1113
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 16:00

I am using webpack-simple template with following configurations:

package.json

{
  \"name\": \"vue-wp-simple\",
  \"description\":          


        
4条回答
  •  心在旅途
    2020-12-09 16:56

    I simply got async functions working by:

    1) Use VUE CLI or terminal to install the following dev dependancies

    In Vue CLI

    example in terminal:

    npm install --save-dev babel-polyfill
    npm install --save-dev babel-plugin-transform-regenerator
    

    2) Then in my main.js file (or file where you create your vue object (new Vue) I added the following import

    import '@babel/polyfill'
    

提交回复
热议问题