Article From:

Excuse me, who has met with me to see the configuration of official documents or not?

Answer 0:

CRAThe decorator is not allowed because it is not stable enough. You can use the decorator.

Answer 1:

I can refer to my project (referencing the decorator)


The project will not update regularly, and more modules will be added later.

If there is a problem, add QQ group 221859379 to communicate with me

If it is helpful to you, give it to star.

Answer 2:

By the way, does babel-plugin-transform-decorators-legacy have NPM install?

Answer 3:

You can addtransform-decorators-legacy It’s yours.node_modules/react-scripts/config/,The code is as follows:

  • Add the following code topresets:
  • Add the following code toplugins The first line:

You can refer to my demo:

Leave a Reply

Your email address will not be published. Required fields are marked *