Skip to content

[Modern] relay-compiler with Typescript? #1863

@voxmatt

Description

@voxmatt

The errors coming out of relay-compiler are a bit difficult to follow (added some logging to troubleshoot), but I assume it's choking on Typescript syntax somewhere because this:

relay-compiler --src ./src --schema ./build-util/schema.gql --extensions ts tsx

Yields this: SyntaxError: Unexpected token, expected } (66:36)

I'm happy to dive into this one, but would appreciate any guidance on how I might get the compiler working with Typescript files. Seems like "swapping in your own FileWriter and FileParser, or by adding on an additional IRTransform" is the way to go, but any additional docs/guidance would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions