some cleanup and gqlgen setup

This commit is contained in:
2024-11-01 19:55:30 +05:30
parent e41d27cf97
commit 1fb2d7d154
39 changed files with 5619 additions and 144 deletions

View File

@@ -1,37 +1,40 @@
import adapter from "@sveltejs/adapter-static";
import path from 'node:path';
import adapter from '@sveltejs/adapter-static';
const webDir = path.resolve('.', 'web');
const webDir = "./web";
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
files: {
appTemplate: `${webDir}/app.html`,
routes: `${webDir}/routes`,
lib: `${webDir}/lib`,
assets: `${webDir}/public`,
},
alias: {
"$image/*": `${webDir}/assets/image/*`,
"$svg/*": `${webDir}/assets/svg/*`,
},
paths: {
assets: process.env.ASSETS_HOST ?? "",
},
version: {
name: `v-${Date.now()}`,
pollInterval: 1000 * 60 * 1, // 5 minutes
},
adapter: adapter({
pages: `${webDir}/public/build`,
assets: `${webDir}/public/build`,
fallback: "fallback.html",
strict: true,
}),
},
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
files: {
appTemplate: path.resolve(webDir, 'app.html'),
routes: path.resolve(webDir, 'routes'),
lib: path.resolve(webDir, 'lib'),
assets: path.resolve(webDir, 'public')
},
alias: {
$image: path.resolve(webDir, 'assets', 'image'),
$svg: path.resolve(webDir, 'assets', 'svg'),
$houdini: path.resolve('.', '$houdini')
},
paths: {
assets: process.env.ASSETS_HOST ?? ''
},
version: {
name: `v-${Date.now()}`,
pollInterval: 1000 * 60 * 1 // 5 minutes
},
adapter: adapter({
pages: path.resolve(webDir, 'public', 'build'),
assets: path.resolve(webDir, 'public', 'build'),
fallback: 'fallback.html',
strict: true
})
}
};
export default config;