-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Basic Config Help #423
Comments
Are you using Vite 3? There are some issues with it. |
I am indeed using vite 3; thanks for putting together that PR. I added your github branch as a dependency and am still running into the same error. I ensured that it was the correct (and only) vite-plugin-relay installed.
From there I configured relay in my package.json and updated my vite config to include the relay plugin. Finally, I'm importing graphql from relay-runtime.
I feel like I'm missing something obvious here. Any thoughts? And thank you - I really appreciate your help. |
I'm looking into it :) |
@collinscangarella Can you try the latest branch version? It should work as expected now :) |
Awesome! Thank you so much. |
@collinscangarella I also started working on a small tool to automate the tedious Relay setup: https://github.com/tobias-tengler/create-relay-app If you happen to have to setup a new Relay project in the future, I would be happy, if you could try out my tool and give feedback if something doesn't work :) |
The v2 version has just been released on npm. If it fixes this problem would be good to close the issue. |
Hello @oscartbeaumont I have a question please: does {
"root": ".",
"excludes": ["**/__mocks__/**", "**/__generated__/**"],
"sources": {
"src/Apps/Admin": "admin",
"src/Apps/Benchmark": "bench"
},
"codegenCommand": "./x relay",
"projects": {
"admin": {
"language": "typescript",
"schema": "schema-admin.graphql",
"eagerEsModules": true,
"requireCustomScalarTypes": true,
"customScalarTypes": {
"UUID": "string",
"LocalDate": "string",
"HexColorCode": "string"
},
"output": "src/types/admin",
"schemaExtensions": []
},
"bench": {
"language": "typescript",
"output": "src/types/benchmark",
"eagerEsModules": true,
"schema": "schema.graphql",
"requireCustomScalarTypes": true,
"customScalarTypes": {},
"schemaExtensions": []
}
}
} Did I miss something? Thanks |
Use this fork and configure plugin with: {
eagerEsModules: true,
artifactDirectory: 'src/types/admin',
} I want to use this original plugin but can't. |
Hello. I followed the getting started instructions to get up and running with the plugin. Unfortunately, things aren't working as expected.
Here is my vite config:
The order of the plugins does not seem to matter. And here's my graphql query:
Unfortunately, this results in the following error
Which leads me to believe that the plugin isn't running. How can I configure the plugin to run the babel transformation?
The text was updated successfully, but these errors were encountered: