minor fixes
This commit is contained in:
@@ -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.+$/
|
||||
});
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user