Giter Site home page Giter Site logo

next@12? about relay-nextjs HOT 3 CLOSED

reverecre avatar reverecre commented on August 29, 2024 1
next@12?

from relay-nextjs.

Comments (3)

rrdelaney avatar rrdelaney commented on August 29, 2024

We have yet to try it out in production because we haven't been able to upgrade to Next.js 12 yet (some peer deps issues), but I've tried it out on a smaller project and the library seems to work fine. It doesn't work with any of the experimental features though, the Relay library apparently isn't a fan of the edge runtime. I keep getting ReferenceError: global is not defined.

from relay-nextjs.

dphuang2 avatar dphuang2 commented on August 29, 2024

We have yet to try it out in production because we haven't been able to upgrade to Next.js 12 yet (some peer deps issues), but I've tried it out on a smaller project and the library seems to work fine. It doesn't work with any of the experimental features though, the Relay library apparently isn't a fan of the edge runtime. I keep getting ReferenceError: global is not defined.

I also ran into that same error. I also tried relay@12 and it failed with β€œcannot resolve module β€˜fs’” when you import GraphQL from babel-plugin-relay/macro. Assuming this is because next js would try to compile for browser but fail when resolving relay.config.js

from relay-nextjs.

dphuang2 avatar dphuang2 commented on August 29, 2024

turns out using import graphql from "babel-plugin-relay/macro" causes the "fs" issue I ran into. Using import { graphql } from "react-relay"; works.

from relay-nextjs.

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.