Skip to content
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

Add namespace option #281

Merged
merged 2 commits into from
Jul 29, 2020

Conversation

rajzik
Copy link
Contributor

@rajzik rajzik commented Apr 22, 2020

This is a fix of 2974.

I have already implemented fork of this repo and tested it with my adoption:
@rajzik/babel-plugin-styled-components.

It is working well and it creates a unique name with the given namespace.
This will resolve all issues with micro frontends class name duplication.

@pgangwani
Copy link

pgangwani commented Apr 23, 2020

Dear core contributors,
Could you please review this PR?
This is the only option I see could work for me where I have micro-frontend setup composed using ESI at akamai (cdn). Please suggest if there is any other way which we are missing.

@mxstbr @probablyup @kitten

@bowsersenior
Copy link

I was looking for exactly this feature to solve a production bug with clashing class names generated by styled-components. It would be awesome to have this feature available!

@rajzik
Copy link
Contributor Author

rajzik commented May 22, 2020

@bowsersenior as for now, I have released fork with namespace setting
plugin-namespace.
It is just fork with namespace added so you can substitute babel-plugin-styled-component with mine.
I am using it, and it works well.

@luanraithz
Copy link

I'm also having a production bug related to multiple styled-components instances conflicting.

@ghost
Copy link

ghost commented Jul 9, 2020

this would also solve a lot of the issues i am having as well, ping again :P

@quantizor
Copy link
Collaborator

If someone could add some docs to the website, that'd be awesome: styled-components/styled-components-website#696

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.

None yet

6 participants