0.1.4 • Published 4 years ago
vite-plugin-gql v0.1.4
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-gqlyarn add vite-plugin-gqlpnpm i vite-plugin-gqlUsage
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.