From 97b6699afefe373d510dda5589a0754a4b380153 Mon Sep 17 00:00:00 2001 From: V Date: Thu, 21 Sep 2023 18:56:58 +0200 Subject: Fuck you Mozilla --- scripts/build/buildWeb.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/build/buildWeb.mjs b/scripts/build/buildWeb.mjs index 02e4da0..e4eeb53 100644 --- a/scripts/build/buildWeb.mjs +++ b/scripts/build/buildWeb.mjs @@ -145,11 +145,11 @@ async function loadDir(dir, basePath = "") { /** * @type {(target: string, files: string[]) => Promise} */ -async function buildExtension(target, files) { +async function buildExtension(target, files, noMonaco = false) { const entries = { "dist/Vencord.js": await readFile("dist/extension.js"), "dist/Vencord.css": await readFile("dist/extension.css"), - ...await loadDir("dist/monaco"), + ...(noMonaco ? {} : await loadDir("dist/monaco")), ...Object.fromEntries(await Promise.all(RnNoiseFiles.map(async file => [`third-party/rnnoise/${file.replace(/^dist\//, "")}`, await readFile(`node_modules/@sapphi-red/web-noise-suppressor/${file}`)] ))), @@ -195,7 +195,7 @@ const appendCssRuntime = readFile("dist/Vencord.user.css", "utf-8").then(content await Promise.all([ appendCssRuntime, buildExtension("chromium-unpacked", ["modifyResponseHeaders.json", "content.js", "manifest.json", "icon.png"]), - buildExtension("firefox-unpacked", ["background.js", "content.js", "manifestv2.json", "icon.png"]), + buildExtension("firefox-unpacked", ["content.js", "manifestv2.json", "icon.png"], true), ]); Zip.sync.zip("dist/chromium-unpacked").compress().save("dist/extension.zip"); -- cgit