Enabling addComponentName with @compiled/babel-plugin in CRA #1579
Unanswered
NikAtIdeally
asked this question in
Q&A
Replies: 1 comment
-
I've tried an empty react app with Parcel and could not get component names to show up om html either. I thought addComponentName would work similar to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to get component names to show up in HTML.
I have my react app setup using CRA + CRACO and I'm using the @compiled/babel-plugin.
Works really well, but somehow I am not able to get the component names to show up. Not sure if that's a bug or am I doing something wrong?
My craco plugin config:
My component:
Thanks!
UPDATE:
Having the following setup does work correctly. Issue seems to be with me using a wrapper object around my styles.
So the issue is with the lib not liking components being children of other entities.
So my question now is there any way to have
Container
be child of an object/namespace and still have their name show up in HTML? Preferably with the parent object nameUPDATE 2:
So I got a work around to get the compiled to do what I want it to do. (almost)
That way it works correctly and I can see component names show up. Would be nice to not have to do that and have component names work in prod env too.
Beta Was this translation helpful? Give feedback.
All reactions