0no-co / gql.tada

🪄 Magical GraphQL query engine for TypeScript
https://gql-tada.0no.co
MIT License
2.38k stars 31 forks source link

RFC: Make vue and svelte dependencies optional #288

Open oceandrama opened 3 weeks ago

oceandrama commented 3 weeks ago

Now, if I use React, i need to install @vue/compiler-dom, @vue/language-core and svelte2tsx, even though it isn't used

I think, it should be optional and live in separate plugins, for example @gql.tada/vue and @gql.tada/svelte and users could install it separately

kitten commented 3 weeks ago

The goal of the project is partially to simplify tooling. As such, there are certaind dev-time dependencies that will be installed as part of the dependencies. Ultimately, you don't install these dependencies directly, so the reason of "I need to install" this is not a valid one to request this, sorry 😅❤️

What I would accept is install time or size, however, typescript is a much higher ratio of install size than any of the other dependencies.

Don't get me wrong, I do find it regrettable that to get the transpilers to TS to work for the CLI, that these dependencies pull in more transitive dependencies. However, the only solution imho for that is to create separate automatically installed plugins, if anything. But as it stands, this is as intended, and asking users to install more dependencies on demand, without this being automated is a documentation/discoverability nightmare