Skip to content

Commit

Permalink
Fix wrong external files and clean up build script; Remove non used s…
Browse files Browse the repository at this point in the history
…tuff
  • Loading branch information
Nuckyz committed May 30, 2024
1 parent 9a9c1b0 commit 3a25da5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build web
run: pnpm buildWeb --standalone
run: pnpm buildWebStandalone

- name: Build
run: pnpm build --standalone
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build web
run: pnpm buildWeb --standalone
run: pnpm buildWebStandalone

- name: Publish extension
run: |
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"build": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs",
"buildStandalone": "pnpm build --standalone",
"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",
"watchWeb": "pnpm buildWeb --watch",
"generatePluginJson": "tsx scripts/generatePluginList.ts",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/buildWeb.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const commonOptions = {
entryPoints: ["browser/Vencord.ts"],
globalName: "Vencord",
format: "iife",
external: ["plugins", "git-hash", "/assets/*"],
external: ["~plugins", "~git-hash", "/assets/*"],
plugins: [
globPlugins("web"),
...commonOpts.plugins,
Expand Down
10 changes: 0 additions & 10 deletions src/utils/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

import { makeLazy } from "./lazy";
import { EXTENSION_BASE_URL } from "./web-metadata";

/*
Add dynamically loaded dependencies for plugins here.
Expand Down Expand Up @@ -67,15 +66,6 @@ export interface ApngFrameData {
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.
// Browser (extension) builds do not contain these remote imports.

Expand Down

0 comments on commit 3a25da5

Please sign in to comment.