-
The
I'm trying to remove those plugins from the
Which seems to get added here: babel/packages/babel-plugin-proposal-decorators/src/transformer-legacy.ts Lines 221 to 224 in 5ebab54 It does work if I configure the targets to a version that requires the class fields to be transpiled. Is the information in the documentation incorrect or am I doing something wrong? I tried reproducing it in the repl, but I'm not sure if the legacy decorators transform can be enabled there. Version information:
Any insights are appreciated, thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The legacy decorators transform relies on the class properties / private methods transform and we have no plan to bring any feature update to that legacy mode. From now on, you have two choices:
However, we should update the docs to note that you can safely remove those plugins only if you are using the stage 3 decorator transforms. |
Beta Was this translation helpful? Give feedback.
The legacy decorators transform relies on the class properties / private methods transform and we have no plan to bring any feature update to that legacy mode. From now on, you have two choices:
version: "2023-05"
, which is designed to work without class elements transform. And both Babel and TS 5.0 support it well, unlike legacy decorator where they have different behaviour.However, we should update the docs to note that you can safely remove those plugins only if you are using the stage 3 decorator transforms.