diff --git a/lib/externals/package.json b/lib/externals/package.json index 731193e..64aaf9f 100644 --- a/lib/externals/package.json +++ b/lib/externals/package.json @@ -3,9 +3,6 @@ "private": true, "type": "module", "exports": { - ".": { - "default": "./src/index.ts" - }, "./browserify": { "default": "./src/browserify.ts" }, diff --git a/lib/externals/src/browserify.ts b/lib/externals/src/browserify.ts index 5b33bf9..37de306 100644 --- a/lib/externals/src/browserify.ts +++ b/lib/externals/src/browserify.ts @@ -11,13 +11,7 @@ export let nodeUtil: typeof import('node:util') = proxify( }, ) - if (module) { - // This allows the Proxy instance to be garbage collected - // after the module is initialized. - nodeUtil = module - gc() - return module - } + if (module) return (nodeUtil = module) }, { hint: 'object', diff --git a/lib/externals/src/index.ts b/lib/externals/src/index.ts deleted file mode 100644 index 61adbcf..0000000 --- a/lib/externals/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as browserify from './browserify' -export * as reactNavigation from './react-navigation' -export * as shopify from './shopify' diff --git a/lib/externals/src/react-navigation.ts b/lib/externals/src/react-navigation.ts index bda83bf..a0b7b60 100644 --- a/lib/externals/src/react-navigation.ts +++ b/lib/externals/src/react-navigation.ts @@ -17,13 +17,7 @@ export let ReactNavigationNative: typeof import('@react-navigation/native') = pr }, ) - if (module) { - // This allows the Proxy instance to be garbage collected - // after the module is initialized. - ReactNavigationNative = module - gc() - return module - } + if (module) return (ReactNavigationNative = module) }, { hint: 'object', @@ -42,13 +36,7 @@ export let ReactNavigationStack: typeof import('@react-navigation/stack') = prox }, ) - if (module) { - // This allows the Proxy instance to be garbage collected - // after the module is initialized. - ReactNavigationStack = module - gc() - return module - } + if (module) return (ReactNavigationStack = module) }, { hint: 'object', diff --git a/lib/externals/src/shopify.ts b/lib/externals/src/shopify.ts index 8ba7f34..0bce8a5 100644 --- a/lib/externals/src/shopify.ts +++ b/lib/externals/src/shopify.ts @@ -19,13 +19,7 @@ export let FlashList: typeof import('@shopify/flash-list') = proxify( }, ) - if (module) { - // This allows the Proxy instance to be garbage collected - // after the module is initialized. - FlashList = module - gc() - return module - } + if (module) return (FlashList = module) }, { hint: 'object',