Files
_Tools/Library/mobile/template/vite.config.ts
2026-11-13 00:38:47 +01:00

12 lines
478 B
TypeScript

import { readFileSync } from "node:fs";
import { defineConfig } from "vite";
// The version shown in-game comes from package.json. Keep versionName in
// android/app/build.gradle in step - a bug report is only useful if it names a build.
const pkg = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8")) as { version: string };
export default defineConfig({
define: { __APP_VERSION__: JSON.stringify(pkg.version) },
build: { target: "es2020" },
});