We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我试了引入mobx, 报错了, 查了一下, 好像是不支持decorators (@)
decorators (@)
参考: https://stackoverflow.com/questions/41138534/mobx-react-unexpected-token
@qiqiboy
The text was updated successfully, but these errors were encountered:
decorators 是一个不稳定的特性,所以没有默认支持。参考:https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#can-i-use-decorators
如果要自己项目支持的话,需要自行安装: 第一步:npm install --save-dev babel-plugin-transform-decorators-legacy 第二步:修改 package.json,在babel字段下,添加 "plugins": [ "transform-decorators-legacy" ] 即可。
npm install --save-dev babel-plugin-transform-decorators-legacy
"plugins": [ "transform-decorators-legacy" ]
Sorry, something went wrong.
好的, 搞定了, 多谢
No branches or pull requests
我试了引入mobx, 报错了, 查了一下, 好像是不支持
decorators (@)
参考: https://stackoverflow.com/questions/41138534/mobx-react-unexpected-token
@qiqiboy
The text was updated successfully, but these errors were encountered: