You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get this plugin up and running in my own project but bumped into the following error ReferenceError: global is not defined. So then the exploration started: I've checked out this repo and tried to boot the example app and I got the same error.
It happens only when running the dev server, the production build goes just fine. Therefore, the end-to-end tests are not failing. I could "fix" it by changing the vite.config.ts content with:
but actually I have no idea why that works. I've noticed that something similar has been changed in #152 but I'm not too much into this to completely oversee the impact.
Full Stacktrace
RelayReferenceMarker.js:333 Uncaught ReferenceError: global is not defined
at node_modules/relay-runtime/lib/store/RelayPublishQueue.js (RelayReferenceMarker.js:333)
at __require2 (chunk-ENMAWK7U.js?v=1254bb04:36)
at node_modules/relay-runtime/lib/store/RelayModernEnvironment.js (RelayModernStore.js:652)
at __require2 (chunk-ENMAWK7U.js?v=1254bb04:36)
at node_modules/relay-runtime/lib/index.js (index.js:10)
at __require2 (chunk-ENMAWK7U.js?v=1254bb04:36)
at node_modules/relay-runtime/index.js (index.js:10)
at __require2 (chunk-ENMAWK7U.js?v=1254bb04:36)
at node_modules/react-relay/lib/ReactRelayContext.js (ReactRelayContext.js:15)
at __require2 (chunk-ENMAWK7U.js?v=1254bb04:36)
The text was updated successfully, but these errors were encountered:
Add something like the following to your index.html.
<script>letglobal=globalThis;</script>
The definition was recently removed from this Vite plugin as it was causing issues with some use cases and is also against Vite's recommendations for plugin authors. When removing it I tested the example project and found no issues so I must have done something incorrectly. I will fix the example and add some documentation about this to the README at some point in the next week.
Thanks for letting me know about this issue.
I was trying to get this plugin up and running in my own project but bumped into the following error
ReferenceError: global is not defined
. So then the exploration started: I've checked out this repo and tried to boot the example app and I got the same error.It happens only when running the dev server, the production build goes just fine. Therefore, the end-to-end tests are not failing. I could "fix" it by changing the
vite.config.ts
content with:but actually I have no idea why that works. I've noticed that something similar has been changed in #152 but I'm not too much into this to completely oversee the impact.
Full Stacktrace
The text was updated successfully, but these errors were encountered: