Skip to content

feat: Move commonjs exports down for worklet files#6316

Merged
tjzel merged 4 commits intomainfrom
@tjzel/plugin/commonjs-exports-file-workletization
Jul 23, 2024
Merged

feat: Move commonjs exports down for worklet files#6316
tjzel merged 4 commits intomainfrom
@tjzel/plugin/commonjs-exports-file-workletization

Conversation

@tjzel
Copy link
Copy Markdown
Collaborator

@tjzel tjzel commented Jul 23, 2024

Summary

Since Reanimated Babel Plugin breaks hoisting and newer Typescript hoists CommonJS exports by default we sometimes need to dehoist those exports.

Test plan

  • Add unit test suite.
  • Runtime tests pass.

@tjzel tjzel marked this pull request as ready for review July 23, 2024 09:56
@tjzel tjzel requested a review from tomekzaw July 23, 2024 09:56
Copy link
Copy Markdown
Collaborator Author

@tjzel tjzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tjzel tjzel added this pull request to the merge queue Jul 23, 2024
Merged via the queue into main with commit 818ed78 Jul 23, 2024
@tjzel tjzel deleted the @tjzel/plugin/commonjs-exports-file-workletization branch July 23, 2024 11:30
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
…6316)

## Summary

Since Reanimated Babel Plugin breaks hoisting and [newer Typescript
hoists CommonJS exports by
default](microsoft/TypeScript#57669) we
sometimes need to dehoist those exports.

## Test plan

- [x] Add unit test suite.
- [x] Runtime tests pass.
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