build: automatically glob all patch files

This commit is contained in:
Vendicated
2025-05-16 20:43:27 +02:00
parent d9a7e81f71
commit 1a673f2318
6 changed files with 40 additions and 23 deletions

View File

@@ -8,6 +8,7 @@ import { BuildContext, BuildOptions, context } from "esbuild";
import { copyFile } from "fs/promises";
import vencordDep from "./vencordDep.mjs";
import { includeDirPlugin } from "./includeDirPlugin.mts";
const isDev = process.argv.includes("--dev");
@@ -78,7 +79,7 @@ await Promise.all([
jsxFactory: "VencordCreateElement",
jsxFragment: "VencordFragment",
external: ["@vencord/types/*"],
plugins: [vencordDep],
plugins: [vencordDep, includeDirPlugin("patches", "src/renderer/patches")],
footer: { js: "//# sourceURL=VCDRenderer" }
})
]);