diff --git a/lib/init/src/index.ts b/lib/init/src/index.ts index 6249c81..2138320 100644 --- a/lib/init/src/index.ts +++ b/lib/init/src/index.ts @@ -10,7 +10,7 @@ import { logger } from './shared' onModuleFirstRequired(0, function onceIndexRequired() { runCatching(() => { - if (!__BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__) require('./patches/log-promise-rejections') + if (__BUILD_FLAG_LOG_PROMISE_REJECTIONS__) require('./patches/log-promise-rejections') // Initialize preinit libraries require('@revenge-mod/modules/preinit') diff --git a/scripts/build.ts b/scripts/build.ts index 976cc58..4cb4281 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -31,7 +31,7 @@ export default async function build(dev = false, log = true) { __BUILD_COMMIT__: JSON.stringify((await $`git rev-parse HEAD`.text()).trim().substring(0, 7)), __BUILD_BRANCH__: JSON.stringify((await $`git rev-parse --abbrev-ref HEAD`.text()).trim()), __BUILD_ENV__: JSON.stringify(dev ? 'development' : 'production'), - __BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__: String(!dev), + __BUILD_FLAG_LOG_PROMISE_REJECTIONS__: String(dev), }, plugins: [ swcPlugin(), diff --git a/shims/react~jsx-runtime.ts b/shims/react~jsx-runtime.ts index 5e9a73e..929d762 100644 --- a/shims/react~jsx-runtime.ts +++ b/shims/react~jsx-runtime.ts @@ -1,5 +1,6 @@ import { ReactJsxRuntime } from '@revenge-mod/react' import { getProxyTarget, isProxy } from '@revenge-mod/utils/proxy' + import type { ElementType } from 'react' const { jsx: _jsx, jsxs: _jsxs, Fragment } = ReactJsxRuntime diff --git a/types.d.ts b/types.d.ts index f842d60..43d980d 100644 --- a/types.d.ts +++ b/types.d.ts @@ -6,7 +6,7 @@ declare global { const __BUILD_BRANCH__: string const __BUILD_VERSION__: string - const __BUILD_FLAG_INIT_DISABLE_PATCH_LOG_PROMISE_REJECTIONS__: boolean + const __BUILD_FLAG_LOG_PROMISE_REJECTIONS__: boolean } export {}