17 lines
408 B
TypeScript
17 lines
408 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
import pkg from './package.json' with { type: 'json' };
|
|
|
|
declare const process: {
|
|
env: Record<string, string | undefined>;
|
|
};
|
|
|
|
const appVersion = process.env.VITE_APP_VERSION ?? pkg.version ?? 'dev';
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(appVersion),
|
|
},
|
|
plugins: [sveltekit()],
|
|
});
|