c8r/lab

Use with babel-plugin-styled-components when ssr is enabled

nathanspecht opened this issue · 1 comments

I've noticed that babel-plugin-styled-components does not recognize styled components written without template literals, e.g.

styled('button')([], space)

rather than

styled('button')`${space}`

In my case, components generated with lab are not given componentIds when the babel plugin's ssr mode is enabled.

For this reason, would it be possible to add an option to choose which syntax is used to export components from lab?

Thank you for your work on this project.

Thanks for pointing this out! I'm surprised the plugin doesn't pick up components without the tagged template literal syntax. The template used for that output is now open source in lab-cli, so I imagine it would be a quick change to use the other syntax