vuex使用面板报 Unexpected token错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vuex使用面板报 Unexpected token错误相关的知识,希望对你有一定的参考价值。

Module build failed: SyntaxError: D:/frontend/webtest/src/components/mutations.vue: Unexpected token (18:4)

1、添加两个插件

npm install --save-dev babel-preset-es2015  babel-plugin-transform-object-rest-spread

安装完成后  

2、修改根目录的.blaberc 文件

{
  "presets": [
    ["es2015",
      {
        "modules": false
      }
    ]
  ],
  "plugins": [
    "transform-object-rest-spread"
  ]
}

  

  

以上是关于vuex使用面板报 Unexpected token错误的主要内容,如果未能解决你的问题,请参考以下文章

spring boot jpahql语句报错 :antlr.NoViableAltException: unexpected token: roleName

JSONP跨域请求数据报错 “Unexpected token :”的解决办法

解决Linux下编译.sh文件报错 unexpected operator Syntax error: word unexpected

VUE3刷新页面报错:Uncaught SyntaxError: Unexpected token ‘<‘

执行shell脚本报错Syntax error: “(“ unexpected

执行shell脚本报错Syntax error: “(“ unexpected