19 lines
431 B
TypeScript
19 lines
431 B
TypeScript
import { sveltekit } from "@sveltejs/kit/vite";
|
|
import { defineConfig } from "vite";
|
|
import { readFileSync } from "node:fs";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const pkg = JSON.parse(
|
|
readFileSync(
|
|
fileURLToPath(new URL("./package.json", import.meta.url)),
|
|
"utf8",
|
|
),
|
|
) as { version: string };
|
|
|
|
export default defineConfig({
|
|
plugins: [sveltekit()],
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
|
},
|
|
});
|