问题描述:
今天在学习mobx的时候发现,使用mobx的装饰器,运行yarn start 报错!!!
解决办法:
- 安装@babel/plugin-proposal-decorators@7.4.4
yarn add @babel/plugin-proposal-decorators@7.4.4
yarn install
- 配置node_modules下的create.js文件
将override按照下面的配置, 将这里的test的正则表达式, 修改为包括tsx,jsx,js在内的文件,并legacy设为true
overrides: [
isFlowEnabled && {
exclude: /\.tsx?$/,
plugins: