Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move transform-class-properties to presets #97

Merged

Conversation

melikhov-dev
Copy link
Contributor

@melikhov-dev melikhov-dev commented Nov 1, 2023

Because we need to run transform after @babel/preset-typescript

SyntaxError: TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript.
If you have already enabled that plugin (or '@babel/preset-typescript'), make sure that it runs before any plugin related to additional class features:

  • @babel/plugin-transform-class-properties
  • @babel/plugin-transform-private-methods
  • @babel/plugin-proposal-decorators

Plugin ordering:

Plugins run before Presets.
Plugin ordering is first to last.
Preset ordering is reversed (last to first).

https://babeljs.io/docs/plugins#plugin-ordering

@melikhov-dev melikhov-dev force-pushed the fix-move-plugin-transform-class-properties-to-presets branch from 19a1590 to 7e4cb1b Compare November 1, 2023 13:12
@melikhov-dev melikhov-dev requested a review from ValeraS November 1, 2023 13:19
@ValeraS ValeraS merged commit 1a6b7ea into main Nov 1, 2023
2 checks passed
@ValeraS ValeraS deleted the fix-move-plugin-transform-class-properties-to-presets branch November 1, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants