Giter VIP home page Giter VIP logo

Comments (6)

ben-rogerson avatar ben-rogerson commented on June 8, 2024

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.

from twin.macro.

mthmcalixto avatar mthmcalixto commented on June 8, 2024

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

from twin.macro.

reedwane avatar reedwane commented on June 8, 2024

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

from twin.macro.

mthmcalixto avatar mthmcalixto commented on June 8, 2024

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

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 twin.macro.

therealgilles avatar therealgilles commented on June 8, 2024

From my limited understanding, withTwin.js disables server components and the metadata object is now only compatible with server components:

The metadata object and generateMetadata function exports are only supported in Server Components.

from twin.macro.

ben-rogerson avatar ben-rogerson commented on June 8, 2024

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.

from twin.macro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.