Vue-element-admin: babel 问题

Created on 14 Jun 2018  ·  5Comments  ·  Source: PanJiaChen/vue-element-admin

image
export default new Router({ // mode: 'history', //后端支持可开 scrollBehavior: () => ({ y: 0 }), routes: constantRouterMap })

Most helpful comment

你编辑器不支持es6吧,或者你babel没配对。

All 5 comments

你编辑器不支持es6吧,或者你babel没配对。

image ,编辑器支持的,我只在这里搜到了babel,请问babel如何配置?

OK已解决,果然babel写错

WechatIMG9
但是又有了个新的问题,这是babel配置:
{ "presets": [ ["env", { "modules": false, "targets": { "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] } }], "stage-2" ], "plugins":["transform-vue-jsx", "transform-runtime"] }

WechatIMG10 我是漏装了什么吗?

Was this page helpful?
0 / 5 - 0 ratings