Path aliases, better lazyWebpack (#268)

This commit is contained in:
Ven 2022-11-28 13:37:55 +01:00 committed by GitHub
parent 7a4402f142
commit bad96b7887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
138 changed files with 572 additions and 547 deletions

View file

@ -16,8 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Link } from "../../../components/Link";
import { Forms, React } from "../../../webpack/common";
import { Link } from "@components/Link";
import { Forms, React } from "@webpack/common";
export default function PronounsAboutComponent() {
return (

View file

@ -16,16 +16,16 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Settings } from "@api/settings";
import { classes, useAwaiter } from "@utils/misc";
import { findByPropsLazy } from "@webpack";
import { UserStore } from "@webpack/common";
import { Message } from "discord-types/general";
import { classes, lazyWebpack, useAwaiter } from "../../../utils/misc";
import { Settings } from "../../../Vencord";
import { filters } from "../../../webpack";
import { UserStore } from "../../../webpack/common";
import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
import { PronounMapping } from "../types";
const styles: Record<string, string> = lazyWebpack(filters.byProps("timestampInline"));
const styles: Record<string, string> = findByPropsLazy("timestampInline");
export default function PronounsChatComponentWrapper({ message }: { message: Message; }) {
// Don't bother fetching bot or system users

View file

@ -16,9 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { useAwaiter } from "../../../utils/misc";
import { Settings } from "../../../Vencord";
import { UserStore } from "../../../webpack/common";
import { Settings } from "@api/settings";
import { useAwaiter } from "@utils/misc";
import { UserStore } from "@webpack/common";
import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
import { PronounMapping, UserProfilePronounsProps, UserProfileProps } from "../types";

View file

@ -16,8 +16,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Devs } from "../../utils/constants";
import definePlugin, { OptionType } from "../../utils/types";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import PronounsAboutComponent from "./components/PronounsAboutComponent";
import PronounsChatComponent from "./components/PronounsChatComponent";
import PronounsProfileWrapper from "./components/PronounsProfileWrapper";

View file

@ -16,9 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { VENCORD_USER_AGENT } from "../../utils/constants";
import { debounce } from "../../utils/debounce";
import { Settings } from "../../Vencord";
import { Settings } from "@api/settings";
import { VENCORD_USER_AGENT } from "@utils/constants";
import { debounce } from "@utils/debounce";
import { PronounsFormat } from ".";
import { PronounCode, PronounMapping, PronounsResponse } from "./types";