Merge branch 'immediate-finds' into immediate-finds-modules-proxy

This commit is contained in:
Nuckyz 2024-05-30 18:11:51 -03:00
commit 8d362fc394
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
6 changed files with 6 additions and 20 deletions

View file

@ -32,7 +32,7 @@ jobs:
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Build web - name: Build web
run: pnpm buildWeb --standalone run: pnpm buildWebStandalone
- name: Build - name: Build
run: pnpm build --standalone run: pnpm build --standalone

View file

@ -32,7 +32,7 @@ jobs:
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Build web - name: Build web
run: pnpm buildWeb --standalone run: pnpm buildWebStandalone
- name: Publish extension - name: Publish extension
run: | run: |

View file

@ -20,7 +20,8 @@
"build": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs", "build": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs",
"buildStandalone": "pnpm build --standalone", "buildStandalone": "pnpm build --standalone",
"buildWeb": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/buildWeb.mjs", "buildWeb": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/buildWeb.mjs",
"buildReporter": "pnpm buildWeb --standalone --reporter --skip-extension", "buildWebStandalone": "pnpm buildWeb --standalone",
"buildReporter": "pnpm buildWebStandalone --reporter --skip-extension",
"watch": "pnpm build --watch", "watch": "pnpm build --watch",
"watchWeb": "pnpm buildWeb --watch", "watchWeb": "pnpm buildWeb --watch",
"generatePluginJson": "tsx scripts/generatePluginList.ts", "generatePluginJson": "tsx scripts/generatePluginList.ts",

View file

@ -33,7 +33,7 @@ const commonOptions = {
entryPoints: ["browser/Vencord.ts"], entryPoints: ["browser/Vencord.ts"],
globalName: "Vencord", globalName: "Vencord",
format: "iife", format: "iife",
external: ["plugins", "git-hash", "/assets/*"], external: ["~plugins", "~git-hash", "/assets/*"],
plugins: [ plugins: [
globPlugins("web"), globPlugins("web"),
...commonOpts.plugins, ...commonOpts.plugins,

7
src/globals.d.ts vendored
View file

@ -64,13 +64,8 @@ declare global {
export var Vesktop: any; export var Vesktop: any;
export var VesktopNative: any; export var VesktopNative: any;
interface Window { interface Window extends Record<PropertyKey, any> {
webpackChunkdiscord_app: {
push(chunk: any): any;
pop(): any;
};
_: LoDashStatic; _: LoDashStatic;
[k: string]: any;
} }
} }

View file

@ -17,7 +17,6 @@
*/ */
import { makeLazy } from "./lazy"; import { makeLazy } from "./lazy";
import { EXTENSION_BASE_URL } from "./web-metadata";
/* /*
Add dynamically loaded dependencies for plugins here. Add dynamically loaded dependencies for plugins here.
@ -67,15 +66,6 @@ export interface ApngFrameData {
playTime: number; playTime: number;
} }
// On web (extensions), use extension uri as basepath (load files from extension)
// On desktop (electron), load from cdn
export const rnnoiseDist = IS_EXTENSION
? new URL("/third-party/rnnoise", EXTENSION_BASE_URL).toString()
: "https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist";
export const rnnoiseWasmSrc = (simd = false) => `${rnnoiseDist}/rnnoise${simd ? "_simd" : ""}.wasm`;
export const rnnoiseWorkletSrc = `${rnnoiseDist}/rnnoise/workletProcessor.js`;
// The below code is only used on the Desktop (electron) build of Vencord. // The below code is only used on the Desktop (electron) build of Vencord.
// Browser (extension) builds do not contain these remote imports. // Browser (extension) builds do not contain these remote imports.