vite-plugin-simple-gql

JSON →
library 0.5.0 ·javascript
verified Jun 7, 2026

A Vite plugin that enables importing .graphql and .gql files as JavaScript modules. Version 0.5.0, actively maintained with monthly releases. Key differentiator: it simply uses graphql-tag under the hood to compile queries to AST, making it lightweight and easy to use compared to heavier solutions like @graphql-tools/webpack-loader for webpack or the built-in Vite support for GraphQL files (which is experimental). No configuration needed beyond adding the plugin to vite.config.js.