minor fixes

This commit is contained in:
Vendicated
2023-04-20 00:01:36 +02:00
parent bc9989f075
commit ea7e06191c
2 changed files with 4 additions and 7 deletions

View File

@@ -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.+$/
});