Skip to content

Component selector is not working on nested styled components #35525

Closed
@Brooooooklyn

Description

@Brooooooklyn

First of all thank you for the great work!
Not sure if I should open another issue but I'm still having a problem after trying out the emotion transform.

Component selectors can only be used in conjunction with @emotion/babel-plugin

Here is an example repo with the issue. https://github.com/macko911/next-swc-emotion-component-selector
Basically I've added only this component to the with-emotion-swc example from the Next.js repo.

export const ComponentSelectors = styled.div`
  ${Basic} {
    color: red;
  }`

Is this a feature that might come later, or will I have to refactor my code so that it doesn't rely on the component selector API?

Originally posted by @macko911 in #30804 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

SWCRelated to minification/transpilation in Next.js.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions