chore(lib/externals): refactor

This commit is contained in:
PalmDevs 2025-05-08 23:43:25 +07:00
parent 5587ede6ba
commit 9e857d7751
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA
5 changed files with 4 additions and 34 deletions

View file

@ -3,9 +3,6 @@
"private": true,
"type": "module",
"exports": {
".": {
"default": "./src/index.ts"
},
"./browserify": {
"default": "./src/browserify.ts"
},

View file

@ -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',

View file

@ -1,3 +0,0 @@
export * as browserify from './browserify'
export * as reactNavigation from './react-navigation'
export * as shopify from './shopify'

View file

@ -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',

View file

@ -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',