From d1d654ebac2d51e3841675faeb56480e440f622f Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Tue, 5 Mar 2024 18:08:09 +0100 Subject: Initial commit --- frontend/svelte.config.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 frontend/svelte.config.js (limited to 'frontend/svelte.config.js') diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js new file mode 100644 index 0000000..dbfdf53 --- /dev/null +++ b/frontend/svelte.config.js @@ -0,0 +1,44 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import adapter from '@sveltejs/adapter-static'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; +import { readFileSync } from 'fs'; +import { fileURLToPath } from 'url'; + +const packageFile = fileURLToPath(new URL('package.json', import.meta.url)); +const packageJSON = readFileSync(packageFile, 'utf8'); +const pkg = JSON.parse(packageJSON); + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + adapter: adapter({ + fallback: 'index.html', + pages: '../src/hircine/static/app' + }), + prerender: { entries: [] }, + alias: { + $gql: './src/gql' + }, + version: { + name: pkg.version + }, + typescript: { + config: (tsconfig) => { + const { ...compilerOptions } = tsconfig.compilerOptions; + + return { + ...tsconfig, + compilerOptions: { + ...compilerOptions + } + }; + } + } + } +}; + +export default config; -- cgit v1.2.3-2-gb3c3