mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-12 08:03:06 -04:00
Webpack Warnings & Errors (#178)
* dev: Useful strict Warnings & Errors * Always log error * Ignore pending patches with all or whose predicate = false * Error -> Warn
This commit is contained in:
parent
b905743077
commit
8adf7ca155
16 changed files with 90 additions and 55 deletions
|
@ -25,7 +25,7 @@ export * as Webpack from "./webpack";
|
|||
|
||||
import { popNotice, showNotice } from "./api/Notices";
|
||||
import { PlainSettings, Settings } from "./api/settings";
|
||||
import { startAllPlugins } from "./plugins";
|
||||
import { patches, PMLogger, startAllPlugins } from "./plugins";
|
||||
|
||||
export { PlainSettings, Settings };
|
||||
|
||||
|
@ -61,6 +61,19 @@ async function init() {
|
|||
UpdateLogger.error("Failed to check for updates", err);
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_DEV) {
|
||||
const pendingPatches = patches.filter(p => !p.all && p.predicate?.() !== false);
|
||||
if (pendingPatches.length)
|
||||
PMLogger.warn(
|
||||
"Webpack has finished initialising, but some patches haven't been applied yet.",
|
||||
"This might be expected since some Modules are lazy loaded, but please verify",
|
||||
"that all plugins are working as intended.",
|
||||
"You are seeing this warning because this is a Development build of Vencord.",
|
||||
"\nThe following patches have not been applied:",
|
||||
"\n\n" + pendingPatches.map(p => `${p.plugin}: ${p.find}`).join("\n")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue