Fixes for pear bin
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Pear-runtime-only ctx.pear host imports (pear-bundle → pear-ref).
|
||||
* Statically imported from bare-os-ctx-bare.js so Pear registers the referrer;
|
||||
* pear-bundle/pear-ref load only when globalThis.Pear is present (Bare-only runs skip).
|
||||
*/
|
||||
|
||||
/** @type {Record<string, unknown>} */
|
||||
export const pearCtxPearOnlyHostByPackage = {}
|
||||
|
||||
if (globalThis.Pear) {
|
||||
const [pearBundleMod, pearRefMod] = await Promise.all([
|
||||
import('pear-bundle'),
|
||||
import('pear-ref')
|
||||
])
|
||||
pearCtxPearOnlyHostByPackage['pear-bundle'] =
|
||||
pearBundleMod?.default !== undefined ? pearBundleMod.default : pearBundleMod
|
||||
pearCtxPearOnlyHostByPackage['pear-ref'] =
|
||||
pearRefMod?.default !== undefined ? pearRefMod.default : pearRefMod
|
||||
}
|
||||
Reference in New Issue
Block a user