vite-plugin-graphql-loader 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +32 -0
  2. package/package.json +44 -0
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # vite-plugin-graphql-loader
2
+
3
+ [![NPM](https://nodei.co/npm/vite-plugin-graphql-loader.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/vite-plugin-graphql-loader/)
4
+
5
+ [![npm version](https://img.shields.io/npm/v/vite-plugin-graphql-loader.svg)](https://www.npmjs.com/package/vite-plugin-graphql-loader)
6
+
7
+ A Vite plugin for loading GraphQL .gql and .graphql files, based on [graphql-tag/loader](https://github.com/apollographql/graphql-tag)
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ yarn add -D vite-plugin-graphql-loader
13
+ ```
14
+
15
+ or
16
+
17
+ ```bash
18
+ npm i vite-plugin-graphql-loader --save-dev
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ In `vite.config.ts` or `vite.config.js`:
24
+
25
+ ```typescript
26
+ import { defineConfig } from "vite";
27
+ import graphqlLoader from "vite-plugin-graphql-loader";
28
+
29
+ export default defineConfig({
30
+ plugins: [graphqlLoader()],
31
+ });
32
+ ```
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "vite-plugin-graphql-loader",
3
+ "version": "1.0.0",
4
+ "description": "A Vite plugin for loading GraphQL files.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "package.json"
10
+ ],
11
+ "scripts": {
12
+ "test": "ts-node __test__/index.ts",
13
+ "build": "rm -rf dist && tsc",
14
+ "ver": "npm version patch",
15
+ "pub": "npm run build && npm run ver && npm publish"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/noiach/vite-plugin-graphql-loader.git"
20
+ },
21
+ "keywords": [
22
+ "vite",
23
+ "vite-plugin",
24
+ "graphql",
25
+ "graphql-tag"
26
+ ],
27
+ "author": "noiach",
28
+ "license": "ISC",
29
+ "bugs": {
30
+ "url": "https://github.com/noiach/vite-plugin-graphql-loader/issues"
31
+ },
32
+ "homepage": "https://github.com/noiach/vite-plugin-graphql-loader#readme",
33
+ "dependencies": {
34
+ "graphql": "^16.6.0",
35
+ "graphql-tag": "^2.12.6"
36
+ },
37
+ "devDependencies": {
38
+ "@types/glob": "^8.0.1",
39
+ "@types/node": "^16",
40
+ "glob": "^8.1.0",
41
+ "ts-node": "^10.9.1",
42
+ "typescript": "^4.9.5"
43
+ }
44
+ }