2024-06-29 09:46:27 +00:00
|
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import { readFileSync } from 'fs';
|
|
|
|
import { fileURLToPath } from 'url';
|
2024-06-30 18:57:32 +00:00
|
|
|
import svg from '@poppanator/sveltekit-svg'
|
2024-06-29 09:46:27 +00:00
|
|
|
|
|
|
|
const packageFile = fileURLToPath(new URL('package.json', import.meta.url));
|
|
|
|
const packageData = readFileSync(packageFile, 'utf8');
|
|
|
|
const packageJSON = JSON.parse(packageData);
|
|
|
|
|
2024-06-17 20:17:27 +00:00
|
|
|
|
|
|
|
export default defineConfig({
|
2024-06-30 18:57:32 +00:00
|
|
|
plugins: [
|
|
|
|
sveltekit(),
|
|
|
|
svg()
|
|
|
|
],
|
2024-06-29 09:46:27 +00:00
|
|
|
define: {
|
|
|
|
APP_VERSION: JSON.stringify(packageJSON.version)
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|