React-MobX Error: The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean

前端 未结 5 667
無奈伤痛
無奈伤痛 2021-02-12 11:52

I get the following error: If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the \'decorators-legacy\' plugin instead of \'dec

5条回答
  •  梦如初夏
    2021-02-12 12:41

    {
     "presets": ['@babel/preset-env', '@babel/preset-react'],
     "plugins": [
      ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "less" }],
      [
        "@babel/plugin-proposal-decorators",
        {
          "decoratorsBeforeExport":true
        }
      ]
     ]
    }
    

提交回复
热议问题