A Vite plugin (v0.1.0) that allows importing .gql and .graphql files as strings, similar to graphql-tag/loader for webpack. It is a lightweight wrapper using the Vite plugin API, requiring Vite 1.x beta or stable. Minimal configuration needed — just add it to plugins. No built-in type support or caching options; designed for small to medium projects. Release cadence: sporadic, last updated in 2021.
npm install vite-plugin-graphqlVerified import paths — ran on the pinned version, not inferred.
Shows how to add the plugin to Vite config and use it to import .graphql or .gql files as strings.
Migrate to a maintained alternative like @rollup/plugin-graphql or graphql-vite-plugin.
Do not use with Vite 2+; find a compatible plugin or upgrade approach.
If you need parsed documents, use graphql-tag together with this plugin, or switch to a more feature-rich loader.
Upgrade to a Vite 2+ compatible GraphQL plugin or downgrade Vite to 1.x.
Run 'npm install vite-plugin-graphql' and ensure the import matches the package name exactly.
No dependency data recorded yet.