main init
This commit is contained in:
11
Library/mobile/template/vite.config.ts
Normal file
11
Library/mobile/template/vite.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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" },
|
||||
});
|
||||
Reference in New Issue
Block a user