From ea7e06191c4288e179a084333947c61250a92cdc Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 20 Apr 2023 00:01:36 +0200 Subject: [PATCH] minor fixes --- build/vencordDep.mjs | 9 +++------ package.json | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/build/vencordDep.mjs b/build/vencordDep.mjs index e76cfdc..56b87bf 100644 --- a/build/vencordDep.mjs +++ b/build/vencordDep.mjs @@ -4,6 +4,7 @@ const names = { webpack: "Vencord.Webpack", "webpack/common": "Vencord.Webpack.Common", utils: "Vencord.Util", + "utils/types": "Vencord.Plugins.External", api: "Vencord.Api", components: "Vencord.Components" }; @@ -12,12 +13,6 @@ export default globalExternalsWithRegExp({ getModuleInfo(modulePath) { const path = modulePath.replace("@vencord/types/", ""); - if (path === "utils/types") - return { - varName: "Vencord.Plugins.External", - type: "cjs" - }; - let varName = names[path]; if (!varName) { const altMapping = names[path.split("/")[0]]; @@ -29,10 +24,12 @@ export default globalExternalsWithRegExp({ // @ts-ignore path.split("/")[1].replaceAll("/", "."); } + return { varName, type: "cjs" }; }, + modulePathFilter: /^@vencord\/types.+$/ }); diff --git a/package.json b/package.json index 7cbdbc7..c2cf225 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@fal-works/esbuild-plugin-global-externals": "^2.1.2", "@types/node": "^18.15.11", - "@vencord/types": "^0.1.2", + "@vencord/types": "latest", "esbuild": "^0.17.17", "prettier": "^2.8.7", "typescript": "^5.0.4"