mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 13:43:03 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
aca48cb9e5
29 changed files with 227 additions and 197 deletions
|
@ -191,8 +191,8 @@ const buildConfigs = ([
|
|||
globalName: "Vencord",
|
||||
sourcemap,
|
||||
plugins: [
|
||||
globPlugins("equicordDesktop"),
|
||||
...commonOpts.plugins
|
||||
globPlugins("equibop"),
|
||||
...commonRendererPlugins
|
||||
],
|
||||
define: {
|
||||
...defines,
|
||||
|
|
|
@ -132,7 +132,7 @@ export const makeAllPackagesExternalPlugin = {
|
|||
};
|
||||
|
||||
/**
|
||||
* @type {(kind: "web" | "discordDesktop" | "vencordDesktop" | "equicordDesktop") => import("esbuild").Plugin}
|
||||
* @type {(kind: "web" | "discordDesktop" | "vesktop" | "equibop") => import("esbuild").Plugin}
|
||||
*/
|
||||
export const globPlugins = kind => ({
|
||||
name: "glob-plugins",
|
||||
|
@ -171,8 +171,8 @@ export const globPlugins = kind => ({
|
|||
(target === "web" && kind === "discordDesktop") ||
|
||||
(target === "desktop" && kind === "web") ||
|
||||
(target === "discordDesktop" && kind !== "discordDesktop") ||
|
||||
(target === "vencordDesktop" && kind !== "vencordDesktop" && kind !== "equicordDesktop") ||
|
||||
(target === "equicordDesktop" && kind !== "equicordDesktop" && kind !== "vencordDesktop");
|
||||
(target === "vesktop" && kind !== "vesktop" && kind !== "equibop") ||
|
||||
(target === "equibop" && kind !== "equibop" && kind !== "vesktop");
|
||||
|
||||
if (excluded) {
|
||||
const name = await resolvePluginName(fullDir, file);
|
||||
|
@ -358,10 +358,6 @@ export const commonOpts = {
|
|||
jsxFragment: "VencordFragment"
|
||||
};
|
||||
|
||||
const escapedBuiltinModules = builtinModules
|
||||
.map(m => m.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"))
|
||||
.join("|");
|
||||
|
||||
export const commonRendererPlugins = [
|
||||
banImportPlugin(/^react$/, "Cannot import from react. React and hooks should be imported from @webpack/common"),
|
||||
banImportPlugin(/^electron(\/.*)?$/, "Cannot import electron in browser code. You need to use a native.ts file"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue