minor fixes
This commit is contained in:
@@ -4,6 +4,7 @@ const names = {
|
|||||||
webpack: "Vencord.Webpack",
|
webpack: "Vencord.Webpack",
|
||||||
"webpack/common": "Vencord.Webpack.Common",
|
"webpack/common": "Vencord.Webpack.Common",
|
||||||
utils: "Vencord.Util",
|
utils: "Vencord.Util",
|
||||||
|
"utils/types": "Vencord.Plugins.External",
|
||||||
api: "Vencord.Api",
|
api: "Vencord.Api",
|
||||||
components: "Vencord.Components"
|
components: "Vencord.Components"
|
||||||
};
|
};
|
||||||
@@ -12,12 +13,6 @@ export default globalExternalsWithRegExp({
|
|||||||
getModuleInfo(modulePath) {
|
getModuleInfo(modulePath) {
|
||||||
const path = modulePath.replace("@vencord/types/", "");
|
const path = modulePath.replace("@vencord/types/", "");
|
||||||
|
|
||||||
if (path === "utils/types")
|
|
||||||
return {
|
|
||||||
varName: "Vencord.Plugins.External",
|
|
||||||
type: "cjs"
|
|
||||||
};
|
|
||||||
|
|
||||||
let varName = names[path];
|
let varName = names[path];
|
||||||
if (!varName) {
|
if (!varName) {
|
||||||
const altMapping = names[path.split("/")[0]];
|
const altMapping = names[path.split("/")[0]];
|
||||||
@@ -29,10 +24,12 @@ export default globalExternalsWithRegExp({
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
path.split("/")[1].replaceAll("/", ".");
|
path.split("/")[1].replaceAll("/", ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
varName,
|
varName,
|
||||||
type: "cjs"
|
type: "cjs"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
modulePathFilter: /^@vencord\/types.+$/
|
modulePathFilter: /^@vencord\/types.+$/
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||||
"@types/node": "^18.15.11",
|
"@types/node": "^18.15.11",
|
||||||
"@vencord/types": "^0.1.2",
|
"@vencord/types": "latest",
|
||||||
"esbuild": "^0.17.17",
|
"esbuild": "^0.17.17",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.0.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user