Closed machineghost closed 7 months ago
The next+sc example worked last time it was visited (3 months ago) - sounds like there's some new issues that have popped up?
btw, Twin runs with babel alongside swc and there was never an upgrade to use just swc with twin.
The next+sc example worked last time it was visited (3 months ago) - sounds like there's some new issues that have popped up?
btw, Twin runs with babel alongside swc and there was never an upgrade to use just swc with twin.
Broke in nextjs 14
The next+sc example worked last time it was visited (3 months ago) - sounds like there's some new issues that have popped up? btw, Twin runs with babel alongside swc and there was never an upgrade to use just swc with twin.
Broke in nextjs 14
yeah. seems so. Couldn't get it to work by updating the template or by manually setting up twin.macro on nextjs 14. I'm getting a false You are attempting to export "metadata" from a component marked with "use client"
. And I am not using a client component on the layout file other than importing the providers where I had declared use client
on them
The next+sc example worked last time it was visited (3 months ago) - sounds like there's some new issues that have popped up? btw, Twin runs with babel alongside swc and there was never an upgrade to use just swc with twin.
Broke in nextjs 14
yeah. seems so. Couldn't get it to work by updating the template or by manually setting up twin.macro on nextjs 14. I'm getting a false
You are attempting to export "metadata" from a component marked with "use client"
. And I am not using a client component on the layout file other than importing the providers where I had declareduse client
on them
Yes, it appears that all files are now from the client when using withTwin.js
They changed something and didn't say anything about it.
From my limited understanding, withTwin.js
disables server components and the metadata
object is now only compatible with server components:
The
metadata
object andgenerateMetadata
function exports are only supported in Server Components.
I made some updates to the next + styled-components example and got it working again but I'm not too happy with the workaround. If anyone can help with a more appropriate fix, please do as I'm out of ideas.
Really I think https://github.com/ben-rogerson/twin.macro/issues/606 should just be re-opened, but in case you'd prefer a new ticket I'll re-post what I said there ...
To be clear, I'm deliberately not pointing to any one issue, because A) there are multitudes of them, and B) the fundamental problem isn't each issue, it's the lack of a working example.