vite-plugin-gql
v0.1.4
Published
Vite plugin for loading GraphQL files
Downloads
7
Maintainers
Readme
vite-plugin-gql
Similar to graphql-tag/loader, but for vite. This is an attempt to take an existing plugin vite-plugin-graphql, update it to match the latest code in graphql-tag's loader, and get it to work properly in a vite project. It does seem to compile the graphql files correct but then at runtime will load them all individually, which is very slow, and fail to execute them properly. PRs against the project are very welcome, and I would very happily give the name of the project over to someone who can make this work properly with their own plugin.
Installation
npm i vite-plugin-gql
yarn add vite-plugin-gql
pnpm i vite-plugin-gql
Usage
const gqlPlugin = require('vite-plugin-gql');
const config = {
plugins: [gqlPlugin],
};
Now all the files ends with .gql
or .graphql
will be handled by vite-plugin-gql
.