diff options
author | Vendicated <vendicated@riseup.net> | 2022-10-26 13:49:28 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-10-26 13:49:28 +0200 |
commit | f492d26379fb47338bc03d08f0d131fbc7863064 (patch) | |
tree | 1c2d1519ccad77ec4c52d1bde24b2e48e73a1baa /src/webpack/common.tsx | |
parent | 56b00f715aef19c04e84dce9d1507da61f08a310 (diff) | |
download | Vencord-f492d26379fb47338bc03d08f0d131fbc7863064.tar.gz Vencord-f492d26379fb47338bc03d08f0d131fbc7863064.tar.bz2 Vencord-f492d26379fb47338bc03d08f0d131fbc7863064.zip |
Make jsFactory shorter -> bundle size -10%
Diffstat (limited to 'src/webpack/common.tsx')
-rw-r--r-- | src/webpack/common.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/webpack/common.tsx b/src/webpack/common.tsx index 0bcc82c..2f9aaa9 100644 --- a/src/webpack/common.tsx +++ b/src/webpack/common.tsx @@ -22,7 +22,7 @@ import type Other from "discord-types/other"; import type Stores from "discord-types/stores"; import { lazyWebpack } from "../utils/misc"; -import { _resolveReady, filters, mapMangledModuleLazy,waitFor } from "./webpack"; +import { _resolveReady, filters, mapMangledModuleLazy, waitFor } from "./webpack"; export const Margins = lazyWebpack(filters.byProps(["marginTop20"])); export let FluxDispatcher: Other.FluxDispatcher; @@ -115,7 +115,12 @@ export const Clipboard = mapMangledModuleLazy('document.queryCommandEnabled("cop SUPPORTS_COPY: x => typeof x === "boolean", }); -waitFor("useState", m => React = m); +waitFor("useState", m => { + window._Ve$ = m.createElement; + window._VF$ = m.Fragment; + React = m; +}); + waitFor(["dispatch", "subscribe"], m => { FluxDispatcher = m; const cb = () => { |