From 676bc612d96c3d1d7c7a80e62bf8e50a2a6fb74b Mon Sep 17 00:00:00 2001 From: Vendicated Date: Wed, 5 Apr 2023 04:09:42 +0200 Subject: VencordDesktop: Include web plugins & use proper showItemInFolder --- scripts/build/common.mjs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts/build/common.mjs') diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs index 53eb23f..7ff599a 100644 --- a/scripts/build/common.mjs +++ b/scripts/build/common.mjs @@ -48,9 +48,9 @@ export const makeAllPackagesExternalPlugin = { }; /** - * @type {import("esbuild").Plugin} + * @type {(kind: "web" | "discordDesktop" | "vencordDesktop") => import("esbuild").Plugin} */ -export const globPlugins = { +export const globPlugins = kind => ({ name: "glob-plugins", setup: build => { const filter = /^~plugins$/; @@ -76,8 +76,10 @@ export const globPlugins = { if (fileBits.length > 2 && ["ts", "tsx"].includes(fileBits.at(-1))) { const mod = fileBits.at(-2); if (mod === "dev" && !watch) continue; - if (mod === "web" && !isWeb) continue; - if (mod === "desktop" && isWeb) continue; + if (mod === "web" && kind === "discordDesktop") continue; + if (mod === "desktop" && kind === "web") continue; + if (mod === "discordDesktop" && kind !== "discordDesktop") continue; + if (mod === "vencordDesktop" && kind !== "vencordDesktop") continue; } const mod = `p${i}`; @@ -93,7 +95,7 @@ export const globPlugins = { }; }); } -}; +}); /** * @type {import("esbuild").Plugin} -- cgit