Skip to content

fix(webpack): enable traversal of child nodes for NativeClass detection#11137

Merged
NathanWalker merged 2 commits intomainfrom
fix/deep-nativeclasses
Mar 16, 2026
Merged

fix(webpack): enable traversal of child nodes for NativeClass detection#11137
NathanWalker merged 2 commits intomainfrom
fix/deep-nativeclasses

Conversation

@edusperoni
Copy link
Copy Markdown
Contributor

@edusperoni edusperoni commented Mar 16, 2026

We were ignoring many other statements, for example:

function test() {
  @NativeClass()
  class Test extends UIView {}
}

const test2 = () => {
  @NativeClass()
  class Test extends UIView {}
};

So now we just traverse the whole tree instead

Fixes #11092

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 16, 2026

View your CI Pipeline Execution ↗ for commit 1df4800

Command Status Duration Result
nx run-many --target=test --configuration=ci --... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-16 13:21:42 UTC

@edusperoni edusperoni requested a review from farfromrefug March 16, 2026 13:19
@NathanWalker NathanWalker merged commit 49562d4 into main Mar 16, 2026
6 of 8 checks passed
@NathanWalker NathanWalker deleted the fix/deep-nativeclasses branch March 16, 2026 13:26
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.

@nativescript/webpack@5.0.25, NativeClass Transformer does not recognize classes defined inside functions

2 participants