Skip to content

improved styled component detection#4

Merged
scttcper merged 5 commits into
scttcper:mainfrom
JonasBa:jb/swc/styled-support
Oct 14, 2025
Merged

improved styled component detection#4
scttcper merged 5 commits into
scttcper:mainfrom
JonasBa:jb/swc/styled-support

Conversation

@JonasBa
Copy link
Copy Markdown
Contributor

@JonasBa JonasBa commented Oct 14, 2025

Improve styled component inference.

We currently cant inject source context into styled(Component) patterns, because they are not JSX element calls, however it should be possible to rewrite these components by rewriting the expression to styled(((props) => <Component data-.... {...props} />)

@JonasBa JonasBa marked this pull request as ready for review October 14, 2025 21:35
Comment thread src/config.rs Outdated
@JonasBa JonasBa force-pushed the jb/swc/styled-support branch from bbdfad5 to 566f92c Compare October 14, 2025 22:21
@scttcper scttcper merged commit 39efde4 into scttcper:main Oct 14, 2025
2 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 14, 2025
[skip ci]

## 1.11.0 (2025-10-14)

* build: Setup trusted publishing, add npm link ([49d21a6](49d21a6))
* feat: improved styled component detection (#4) ([39efde4](39efde4)), closes [#4](#4)
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