20 lines
720 B
JavaScript
20 lines
720 B
JavaScript
/**
|
|
* 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
|
|
}
|