Skip to content
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

Add option to integrate with vite-plugin-relay-lite #12

Closed
XiNiHa opened this issue Sep 8, 2022 · 1 comment
Closed

Add option to integrate with vite-plugin-relay-lite #12

XiNiHa opened this issue Sep 8, 2022 · 1 comment

Comments

@XiNiHa
Copy link

XiNiHa commented Sep 8, 2022

vite-plugin-relay-lite has some advantages like providing smooth integration with the Relay compiler, and transforming the code really fast. While I think it shouldn't be recommended in general (since it doesn't actually parse AST, which makes it break on some cases), I believe it's worth adding an option for it.

@tobias-tengler
Copy link
Owner

I don't think I'll add support for it. I'm already having trouble with vite-plugin-relay, since it does not support Vite 3.
Adding another library that might break in the future, increases the maintainance cost on this project, which I don't want to happen. The Vite + Relay community also seems to be rather small (not even 70 combined stars for both libraries), so introducing this dependency doesn't seem worth it to me. The only real selling point over vite-plugin-relay is being faster, while being higher risk in all other areas, e.g. custom config resolution, no AST traversal as you mentioned and possibly slight differences to how the official babel-plugin-relay and the relay-compiler works now (and possibly in the future). I like the adapter approach of vite-plugin-relay more, since even though it might not be as fast, it's consistent to the official implementation. I also submitted a PR to it where I added Vite 3 support and moved all of the configuration of babel-plugin-relay out of the code and made the dependency a peerDependency, so it's truly just an adapter and everything around configuration and updating is the responsibility of the user.

Sorry for the bad news. I hope my stance is reasonable. Forking the project and introducing support yourself is of course always an option :)

@tobias-tengler tobias-tengler closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants