vite-plugin-relay icon indicating copy to clipboard operation
vite-plugin-relay copied to clipboard

Relay 13 support - Rust compiler: definition of 'XYZQuery' appears to have changed

Open sync opened this issue 2 years ago • 5 comments

In order to avoid having this issue when using Relay 13: https://github.com/facebook/relay/issues/3437 we would need to upgrade the babel-plugin-relay to ^13.0.0.

Before I sent you a PR would have happy to include this change ? it looks like it might be a breaking change for all the non 13.x relay user.

I've tested the upgrade on a complicated relay + Vite codebase and except for this required fix everything else is working.

sync avatar Jan 06 '22 23:01 sync

Please send the PR through. I have been intending to release a new version of this package for a few days so once you get that though I will release an update. I will release it as version 2.0.0 and this should help with the backwards compatibility aspect.

oscartbeaumont avatar Jan 07 '22 02:01 oscartbeaumont

cool give me till the end of my day and I'll sent this trough in about 8 hours

sync avatar Jan 07 '22 02:01 sync

I forgot will do this soonish. Also we now need to upgrade babel-plugin-relay to 13.0.1 and rename eagerESModules to eagerEsModules . Tested on my side with those changes everything works.

these are the relay changes: https://github.com/facebook/relay/pull/3724/files

sync avatar Jan 11 '22 08:01 sync

@oscartbeaumont Can you please check #303

cliedeman avatar Apr 04 '22 12:04 cliedeman

My PR should address these issues, by moving the babel-plugin-relay dependency out of this plugin: https://github.com/oscartbeaumont/vite-plugin-relay/pull/424

tobias-tengler avatar Aug 12 '22 14:08 tobias-tengler