lab icon indicating copy to clipboard operation
lab copied to clipboard

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

Open nathanspecht opened this issue 8 years ago • 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.

nathanspecht avatar Oct 25 '17 22:10 nathanspecht

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

jxnblk avatar Dec 17 '17 23:12 jxnblk