Skip to content

legacy decorators + preset-env issue #15912

Answered by JLHwung
Windvis asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  1. migrate to the stage-3 decorator 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.
  2. manually include the class elements transform with the legacy decorators

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.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Windvis
Comment options

@Windvis
Comment options

@JLHwung
Comment options

@JLHwung
Comment options

Answer selected by Windvis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants