kripod / glaze

CSS-in-JS microlibrary for making design systems approachable with React
https://glaze.js.org/
MIT License
414 stars 10 forks source link

Not working in Next.js #6

Closed merelinguist closed 4 years ago

merelinguist commented 4 years ago

Description

Trying to use the most minimal version of this, but is breaking with the error: No treat theme provided

Reproduction

See this Sandbox.

kripod commented 4 years ago

Thank you for reporting!

I've just created a Next.js example project, demonstrating the setup as recommended by treat. Unfortunately, I couldn't manage to set up a Code Sandbox this time. A treat.theme.{js,ts} file is always required, and createTheme from 'glaze' shall be called exclusively from there to provide static style extraction.

A custom Next plugin could also be made for treat, removing boilerplate code from projects.

I would appreciate your feedback on the newly-made example project.

merelinguist commented 4 years ago

Looks great, thank you!