diff --git a/build.mjs b/build.mjs index 827bf44..25cbfe9 100644 --- a/build.mjs +++ b/build.mjs @@ -1,5 +1,4 @@ import { build } from "esbuild"; -import { replace } from "esbuild-plugin-replace"; import alias from "esbuild-plugin-alias"; import swc from "@swc/core"; import { promisify } from "util"; @@ -43,10 +42,10 @@ try { }, }, alias(aliases), - replace({ - "__vendettaVersion": commit, - }), ], + define: { + __vendettaVersion: `"${commit}"`, + }, legalComments: "none", }); diff --git a/package.json b/package.json index dab3fb2..01a48a0 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "@types/react-native": "0.70.6", "esbuild": "^0.17.11", "esbuild-plugin-alias": "^0.2.1", - "esbuild-plugin-replace": "^1.3.0", "moment": "2.22.2", "typescript": "^4.9.5" }, diff --git a/src/lib/debug.ts b/src/lib/debug.ts index 0ed7a44..c8ef9a5 100644 --- a/src/lib/debug.ts +++ b/src/lib/debug.ts @@ -43,7 +43,8 @@ export function patchLogHook() { } } -export const versionHash = "__vendettaVersion"; +// @ts-expect-error +export const versionHash: string = __vendettaVersion; export function getDebugInfo() { // Discord