diff --git a/lib/react/src/native/_internal.ts b/lib/react/src/native/_internal.ts new file mode 100644 index 0000000..3d3c87a --- /dev/null +++ b/lib/react/src/native/_internal.ts @@ -0,0 +1,4 @@ +import type { RunApplicationCallback } from '@revenge-mod/react/types' + +export const sBeforeRunApplication = new Set() +export const sAfterRunApplication = new Set() diff --git a/lib/react/src/native/index.ts b/lib/react/src/native/index.ts index cec7ced..d2f43b1 100644 --- a/lib/react/src/native/index.ts +++ b/lib/react/src/native/index.ts @@ -1,4 +1,4 @@ -import { sAfterRunApplication, sBeforeRunApplication } from './patches' +import { sAfterRunApplication, sBeforeRunApplication } from './_internal' import type { RunApplicationCallback } from '@revenge-mod/react/types' /** diff --git a/lib/react/src/native/patches.ts b/lib/react/src/native/patches.ts index b835a2b..bf69a17 100644 --- a/lib/react/src/native/patches.ts +++ b/lib/react/src/native/patches.ts @@ -1,9 +1,6 @@ import { after, before } from '@revenge-mod/patcher' import { ReactNative } from '..' -import type { RunApplicationCallback } from '../types' - -export const sBeforeRunApplication = new Set() -export const sAfterRunApplication = new Set() +import { sAfterRunApplication, sBeforeRunApplication } from './_internal' before(ReactNative.AppRegistry, 'runApplication', args => { for (const cb of sBeforeRunApplication) diff --git a/lib/react/src/preinit.ts b/lib/react/src/preinit.ts index 12acb30..54a86d7 100644 --- a/lib/react/src/preinit.ts +++ b/lib/react/src/preinit.ts @@ -1,4 +1,2 @@ // Initialize the wait immediately, so we don't miss the actual modules before the re-exports import '.' - -import './native/patches'