使用react时遇到Support for the experimental syntax ‘decorators-legacy‘ isn‘t currently enabled的解决方案
问题:
SyntaxError: E:\content.js: Support for the experimental syntax 'decorators-legacy' isn't currently enabled
解决方案:
安装相应的包
npm add customize-cra react-app-rewired @babel/plugin-proposal-decorators --dev
在项目的根目录下创建config-overrides.js文件,并对应加入以下内容
con
原创
2021-08-23 15:44:10 ·
1559 阅读 ·
1 评论