-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any way to customize the displayName? #321
Comments
Still not easy to locate deep components. Class name like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the plugin generates
displayName
for each styled components, but it is still difficult to locate the components.The plugin uses basename as the
displayName
.babel-plugin-styled-components/src/visitors/displayNameAndId.js
Lines 56 to 64 in 950692b
If the application structure is complex, it is difficult for developers to identify the specific component location.
The generated class names are as follows. It's hard to find where the components are.
Proposal
It would be clearer to add the path information to the classname. Just like
localIdentName: "[path][name]__[local]"
in thecss-loader
.Expected result:
The text was updated successfully, but these errors were encountered: