aboutsummaryrefslogtreecommitdiff
path: root/scripts/build/buildWeb.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/buildWeb.mjs')
-rw-r--r--scripts/build/buildWeb.mjs11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/build/buildWeb.mjs b/scripts/build/buildWeb.mjs
index 8cf1ff3..02e4da0 100644
--- a/scripts/build/buildWeb.mjs
+++ b/scripts/build/buildWeb.mjs
@@ -57,6 +57,13 @@ const MonacoWorkerEntryPoints = [
"vs/editor/editor.worker.js"
];
+const RnNoiseFiles = [
+ "dist/rnnoise.wasm",
+ "dist/rnnoise_simd.wasm",
+ "dist/rnnoise/workletProcessor.js",
+ "LICENSE"
+];
+
await Promise.all(
[
esbuild.build({
@@ -143,7 +150,9 @@ async function buildExtension(target, files) {
"dist/Vencord.js": await readFile("dist/extension.js"),
"dist/Vencord.css": await readFile("dist/extension.css"),
...await loadDir("dist/monaco"),
- ...await loadDir("browser/third-party", "browser/"),
+ ...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}`)]
+ ))),
...Object.fromEntries(await Promise.all(files.map(async f => {
let content = await readFile(join("browser", f));
if (f.startsWith("manifest")) {