Giter Club home page Giter Club logo

Comments (5)

alloy avatar alloy commented on July 24, 2024

I don’t completely follow if your TS artifacts are created or not and why your app doesn’t start, can you elaborate on that?

Also, can you make sure to use 1.7.0-rc.1 for all the relay dependencies?

from relay-compiler-language-typescript.

jgfidelis avatar jgfidelis commented on July 24, 2024

Hey! Sorry for the confusion! I am not experienced enough in relay and may be getting some concepts confused.

I have a App.tsx in my src folder. After running tsc, I get a outputs folder with the transpiled .js files. My index.js imports the App component from outputs/App. Is this kind of structure supported by this plugin?

Here is part of my tsconfig.json to make it more clear:

"compilerOptions": {
    "target": "es2015",
    "moduleResolution": "node",
    "jsx": "react-native",
    "noEmit": false,
    "outDir": "outputs",
....

When I run yarn relay, and run my app, I get an red screen saying I do not have __generated__ folder in my outputs folder:
screen shot 2018-10-28 at 10 44 46

Right now I am thinking: The correct thing should be: get a __generated__ folder in my src folder so I can access the generated types and then all copy them to the outputs folder as well.

If I manually copy src/__generated__ to outputswith cp src/__generated__ outputs/, the app starts correctly.

Is that more clear?

Also, can you make sure to use 1.7.0-rc.1 for all the relay dependencies?

How is the best way to guarantee this?

from relay-compiler-language-typescript.

sibelius avatar sibelius commented on July 24, 2024

check https://github.com/entria/entria-fullstack for examples using typescript without having a single artifact directory

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

@jgfidelis Sorry for missing this. I'm sure you're no longer dealing with this (and as such I'll close it too , but feel free to re-open); but your issue seems mostly related to your build process. If you're generating the artefacts into src and then running tsc, I would expect compiled versions of the artefacts to show up in outputs as well.

from relay-compiler-language-typescript.

alloy avatar alloy commented on July 24, 2024

@sibelius I wouldn't suggest you do that, though, as you're not type-checking that the correct data gets passed to child containers (fragment references).

from relay-compiler-language-typescript.

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.