styled-components-website icon indicating copy to clipboard operation
styled-components-website copied to clipboard

Add info about SSR to plugin namespace documentation

Open byzg opened this issue 4 years ago • 0 comments

At the page https://styled-components.com/docs/tooling#namespace we can see that we can use

{
  "plugins": [
    ["babel-plugin-styled-components", {
      "namespace": "my-app"
    }]
  ]
}

but it is not working when ssr: false at the same time cause code of the plugin image Namespace is used only in getComponentId so we can`t use namespace when ssr: false

PS: I spent about 40 hours in order to solve issue of conflict several instances and tried different plugins including babel-plugin-styled-components and other ways but had no result until I figured out the code of the plugin. So I think changes of DOCs could save day of somebody

byzg avatar Mar 12 '21 16:03 byzg