facebook / facebook/relay

Compiler config format from docs does not work

Open
#3,866 0 comments 1 reaction 0 assignees View on GitHub
rust
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

While [the docs say](https://relay.dev/docs/getting-started/installation-and-setup/#compiler-configuration) to make a `relay.config.js` file which exports an object, doing so doesn't actually work, as the compiler expects the file to be JSON, even if it is named `relay.config.js`.

Basic reproduction here: https://glitch.com/edit/#!/statuesque-jeweled-condorraptor

Here's what happens when you try to use different config files:
image

`relay.config.actually-json.js` is in JSON format, despite being named `.js`.

Contributor guide

Open the contributing guide

Research direction

Read the compiler configuration section in the installation and setup docs, then reproduce the issue using the linked Glitch example and the named relay.config.js variants. Compare the documented JavaScript-object format with the compiler's accepted format; done means the documented configuration works or the docs accurately describe the required format.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.