yandex / reshadow

Markup and styles that feel right
https://reshadow.dev
Other
363 stars 15 forks source link

Conflict with babel-plugin-styled-components #42

Open comerc opened 5 years ago

comerc commented 5 years ago

I try to use @reshadow/styled in CRA.

I forgot to exclude babel-plugin-styled-components.

I have error: _reshadow_styled__WEBPACK_IMPORTED_MODULE_6___default(...)(...).withConfig is not a function

comerc commented 5 years ago

And I want to analog of this plugin functionality.

lttb commented 5 years ago

Hi @comerc, thank you for the issue.

The problem is that babel-plugin-styled-components still processes the styled function, despite the fact that it was not imported from styled-components.

We should make it clear in the docs, that it needs to exclude this plugin.

About the plugin functionality:

An important thing, that reshadow supports the css prop without babel.

I'll try too look at this week in case of reshadow compatibility with babel-plugin-styled-components, and maybe we can make some things work out of the box, but it would be better to implement the same functionality without depending on the styled-components internals