-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
35 lines (30 loc) · 1007 Bytes
/
svelte.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import adapter from '@sveltejs/adapter-auto';
import preprocess from 'svelte-preprocess';
import gQueryCodegen from '@leveluptuts/g-query/codegen';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
adapter: adapter(),
// Override http methods in the Todo forms
methodOverride: {
allowed: ['PATCH', 'DELETE']
},
vite: {
plugins: [
gQueryCodegen({
// Required
// schema: 'http://localhost:3001/graphql' // this can also be a url to a graphql api
schema: './src/lib/graphql/schema/server', // path to schema, schema is required
out: './src/lib/graphql', // Where you want the general schema types to output
gPath: '$lib/config/g', // Path to g, created in step 1.
// Optional
debug: true // boolean, this adds logging for gq files deleted and on codegen
})
]
}
}
};
export default config;