cristianbote / goober

🥜 goober, a less than 1KB 🎉 css-in-js alternative with a familiar API
https://goober.rocks
MIT License
3.14k stars 118 forks source link

Usage with rollup #549

Closed milad-afkhami closed 1 year ago

milad-afkhami commented 1 year ago

I was building a design system library that utilizes goober to have fast CSS-in-JS.

I created the smallest component with Goober:

export const StyledSomething = styled("div")``;

Everything is fine and I can generate a build without any errors.

But when I install this package in a project and try to use the StyledSomething component, I get the below error:

Server Error
TypeError: d is not a function

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
a
renderWithHooks
renderForwardRef
renderElement
renderNodeDestructiveImpl
renderNodeDestructive
renderNode
renderChildrenArray

The library stack:

Stack of the project that is using my library:

milad-afkhami commented 1 year ago

Just found out that Goober requires an invocation of the setup method also in the package itself and not only in the consumer app.

Closing it for now