restructure for sveltekit

This commit is contained in:
ari melody 2024-06-29 10:46:27 +01:00
parent 7deea47857
commit 9ef27fd2a2
Signed by: ari
GPG key ID: CF99829C92678188
73 changed files with 469 additions and 28 deletions

View file

@ -1,7 +1,17 @@
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
const packageFile = fileURLToPath(new URL('package.json', import.meta.url));
const packageData = readFileSync(packageFile, 'utf8');
const packageJSON = JSON.parse(packageData);
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
})
plugins: [sveltekit()],
define: {
APP_VERSION: JSON.stringify(packageJSON.version)
}
});