-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use relay.config.js with ESM module #4060
Comments
JSON formats work correctly if you don't need to run js. |
relay-compiler once accepted Any thought? |
See also: c20ed27 |
Oh, we probably removed cjs by mistake. |
Will we add back the support for CJS? Thank you! |
Convert the Environment: |
I created a fix in #4873 which handles all three module format scenarios:
|
ESM
Node: 18.5.0
package.json
:relay.config.js
:Run:
yarn run relay
It fails with:
CJS (.js)
See what happens if we modify it to be CJS:
relay.config.js
:Run:
yarn run relay
It fails with:
CJS (.cjs)
Now try and rename it from
relay.config.js
torelay.config.cjs
like it says.Also update
package.json
to:Run:
yarn run relay
Now it fails with:
The text was updated successfully, but these errors were encountered: