Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cms-admin 用的iview,为什么都没有babelrc配置,能否做到开箱即用? #28

Open
wallowbear opened this issue Apr 12, 2019 · 1 comment

Comments

@wallowbear
Copy link

wallowbear commented Apr 12, 2019

直接npm i &&npm run dev无法直接跑起项目 ,现在卡在mock模拟初始数据这个块,看配置用的是webpack4 & babel 7 ,找了网上的.babel 7配置

{
"presets": [
["@babel/preset-env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
},
"useBuiltIns": "usage"
}]
],
"plugins": ["transform-vue-jsx","@babel/plugin-syntax-dynamic-import"]
}

目前跑起来,但console报错,定位在mock/index.js

Uncaught ReferenceError: getUserInfo is not defined,感觉还是babel这块问题,请问有人遇到这问题吗?
@417511458

@417511458
Copy link
Owner

这个需要npm run build,然后运行Application的main即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants