12 lines
478 B
TypeScript
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" },
|
||
|
|
});
|