Skip to content

Commit

Permalink
add require.all
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCommieAxolotl committed Dec 21, 2023
1 parent f66412d commit 4d73c2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ declare global {
*
* *Do not use this explicitly*
*/
require: <I extends InternalModule>(id: I) => RequireResult<I>;
require: (<I extends InternalModule>(id: I) => RequireResult<I>) & {
all: InternalModule[];
};
webpackChunkdiscord_app: any;
DiscordNative: any;

Expand Down
2 changes: 2 additions & 0 deletions packages/renderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ window.require = (id: string) => {
}
};

window.require.all = ["aero", "aero/dom", "aero/badges", "aero/plugin", "aero/webpack", "aero/theme", "aero/ui"];

const initialise = async () => {
window.DiscordNative?.window.setDevtoolsCallbacks((_) => _);

Expand Down

0 comments on commit 4d73c2f

Please sign in to comment.