diff --git a/scripts/build/common.mjs b/scripts/build/common.mjs index c46a559a7..62a36ff27 100644 --- a/scripts/build/common.mjs +++ b/scripts/build/common.mjs @@ -299,7 +299,7 @@ export const commonOpts = { logLevel: "info", bundle: true, watch, - minify: !watch, + minify: !watch && !IS_REPORTER, sourcemap: watch ? "inline" : "", legalComments: "linked", banner, diff --git a/src/components/PluginSettings/PluginModal.tsx b/src/components/PluginSettings/PluginModal.tsx index 364d0a48c..a340dbc16 100644 --- a/src/components/PluginSettings/PluginModal.tsx +++ b/src/components/PluginSettings/PluginModal.tsx @@ -28,8 +28,8 @@ import { Margins } from "@utils/margins"; import { classes, isObjectEmpty } from "@utils/misc"; import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { OptionType, Plugin } from "@utils/types"; -import { findByProps, findComponentByCode, webpackDependantLazy } from "@webpack"; -import { Button, Clickable, FluxDispatcher, Forms, React, Text, Tooltip, UserStore, UserUtils } from "@webpack/common"; +import { find, findByProps, findComponentByCode } from "@webpack"; +import { Button, Clickable, FluxDispatcher, Forms, React, Text, Tooltip, UserUtils } from "@webpack/common"; import { User } from "discord-types/general"; import { Constructor } from "type-fest"; @@ -51,7 +51,7 @@ const cl = classNameFactory("vc-plugin-modal-"); const UserSummaryItem = findComponentByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers"); const AvatarStyles = findByProps("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar"); -const UserRecord = webpackDependantLazy>>(() => UserStore.getCurrentUser().constructor as any); +const UserRecord = find>>(m => m?.prototype?.getAvatarURL && m?.prototype?.hasHadPremium); interface PluginModalProps extends ModalProps { plugin: Plugin;