Open bgentry opened 9 months ago
Hi! Not sure why it was like this, but it seems that the problem comes from the vite config:
define: {
'process.env.NODE_ENV': '"production"',
},
This enables production build, and it seems that React Fast refresh exports are not the same when running with production mode enabled...
Remove this lines and it should start as expected :-)
Describe the bug
I was going to take care of https://github.com/dotansimha/graphql-yoga/issues/2650 by adding support for additional Graphiql context configs. As part of that, I cloned the repo, ran
pnpm i
, and started the vite server inpackages/graphiql
withpnpm start
.Unfortunately, it appears that this dev server is broken. The following error occurs for me when trying to load this page, with no changes to the repo on a fresh clone:
I noticed there are quite a few out-of-date dependencies here, including vite, graphql, graphiql, react, etc. I tried upgrading these to see if it would resolve the issue but it did not.
Your Example Website or App
https://github.com/dotansimha/graphql-yoga
Steps to Reproduce the Bug or Issue
pnpm i
cd packages/graphiql && pnpm start
Expected behavior
I should be able to load the GraphiQL UI when developing this repo.
Screenshots or Videos
No response
Platform
@graphql-yoga/*
version(s):main
Additional context
If it turns out that this flow still works for any of the maintainers, I'm happy to help debug what it is about my local setup that's causing this to fail on a fresh clone.