react引用mobx报错Support for the experimental syntax
作者:互联网
react引用mobx报错Support for the experimental syntax ‘decorators-legacy’ isn’t currently enabled
解决方式如下:
1.npm run eject
2.在package.json添加如下代码:
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
]
]
如果你执行npm run eject是报错,那可能没有本地仓库.git需要先执行以下命令:
1.git init
2.git add .
3.git commit -m ‘init’
然后就可以执行npm run eject了
标签:npm,git,run,eject,Support,syntax,报错 来源: https://blog.csdn.net/weixin_41254345/article/details/115037410