create-react-app构建的react项目中使用mobx会出现修饰器警告
解决办法
- 命令行输入:npm run eject
修改package.json文件中babel配置:
"babel": {"presets": [ "react-app" ], "plugins":[ [ "@babel/plugin-proposal-decorators", { "legacy":true } ], [ "@babel/plugin-proposal-class-properties", { "loose":true } ] ] }
相关推荐
82530995 2020-05-10
82530995 2020-10-15
ruanhongbiao 2020-08-16
FEvivi 2020-06-16
FEvivi 2020-06-13
PANH 2020-06-12
zhongweinan 2020-06-10
PANH 2020-06-07
PANH 2020-06-01
webfullStack 2020-04-26
zhongweinan 2020-04-24
FEvivi 2020-04-17
FEvivi 2020-04-15
zhongweinan 2020-03-03
zhongweinan 2020-02-21
PANH 2020-02-19
PANH 2020-01-23
zhongweinan 2020-01-21
上海彭彭 2020-01-14