build: Add metadata header to all bundles

This commit is contained in:
Vendicated 2022-11-07 21:29:31 +01:00
parent 0af4579204
commit a13c0df1cd
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3
3 changed files with 11 additions and 12 deletions

View file

@ -19,7 +19,7 @@
import esbuild from "esbuild";
import { commonOpts, gitHash, globPlugins, isStandalone, watch } from "./common.mjs";
import { commonOpts, globPlugins, isStandalone, watch } from "./common.mjs";
const defines = {
IS_STANDALONE: isStandalone,
@ -30,12 +30,6 @@ if (defines.IS_STANDALONE === "false")
// for the specific platform we're on
defines["process.platform"] = JSON.stringify(process.platform);
const header = `
// Vencord ${gitHash}
// Standalone: ${defines.IS_STANDALONE}
// Platform: ${defines["process.platform"] || "Universal"}
`.trim();
/**
* @type {esbuild.BuildOptions}
*/
@ -48,9 +42,6 @@ const nodeCommonOpts = {
bundle: true,
external: ["electron", ...commonOpts.external],
define: defines,
banner: {
js: header
}
};
await Promise.all([