Skip to content

fix(transform): strip non-Angular class decorators from compiled output#48

Merged
Brooooooklyn merged 1 commit intomainfrom
fix/strip-non-angular-class-decorators
Mar 3, 2026
Merged

fix(transform): strip non-Angular class decorators from compiled output#48
Brooooooklyn merged 1 commit intomainfrom
fix/strip-non-angular-class-decorators

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

@Brooooooklyn Brooooooklyn commented Mar 3, 2026

When a class had both Angular decorators (@component, @directive, etc.)
and non-Angular class decorators (e.g. @UntilDestroy()), only the Angular
decorator was removed during compilation. The non-Angular decorator
remained in the output, producing invalid JS since it decorated a compiled
class with static ɵcmp/ɵfac fields rather than a plain class declaration.

Fix by collecting ALL class-level decorator spans for removal when any
Angular decorator is present, instead of only the single Angular one.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


Note

Cursor Bugbot is generating a summary for commit 849572f. Configure here.

When a class had both Angular decorators (@component, @directive, etc.)
and non-Angular class decorators (e.g. @UntilDestroy()), only the Angular
decorator was removed during compilation. The non-Angular decorator
remained in the output, producing invalid JS since it decorated a compiled
class with static ɵcmp/ɵfac fields rather than a plain class declaration.

Fix by collecting ALL class-level decorator spans for removal when any
Angular decorator is present, instead of only the single Angular one.

- Close #44

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member Author

Brooooooklyn commented Mar 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Brooooooklyn Brooooooklyn merged commit 95ef483 into main Mar 3, 2026
4 checks passed
@Brooooooklyn Brooooooklyn deleted the fix/strip-non-angular-class-decorators branch March 3, 2026 07:49
Brooooooklyn added a commit that referenced this pull request Mar 3, 2026
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.

Non Angular class decorators break OXC compiled output

1 participant