vite-plugin-simple-gql
v0.5.0
Published
Easily import gql and graphql files
Downloads
6,501
Readme
⚡ vite-plugin-simple-gql
Easily import [.graphql
] and [.gql
] files using Vite
.
Install
npm i vite-plugin-simple-gql -D
# yarn add vite-plugin-simple-gql -D
Usage
add this plugin to vite.config.js
import { defineConfig } from 'vite';
import gql from 'vite-plugin-simple-gql';
export default defineConfig({
plugins: [gql()]
});
import your graphql
files
import MyQuery from './queries/MyQuery.graphql'
License
MIT