Files
klz-cables.com/.pnpm-store/v10/files/1c/31b27dcde9628b8f3a4dd395f08a7c702c2a7e5281ed1730daa9456de1f7b5918662b0eb7aa9b2de4b826e780e30c47cd2e8c7e633eb42072022f2ac66bbc0
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

35 lines
1.0 KiB
Plaintext

import { GLOBAL_OBJ, debug } from '@sentry/core';
import { createAddHookMessageChannel } from 'import-in-the-middle';
import * as moduleModule from 'module';
import { supportsEsmLoaderHooks } from '../utils/detection.js';
/**
* Initialize the ESM loader - This method is private and not part of the public
* API.
*
* @ignore
*/
function initializeEsmLoader() {
if (!supportsEsmLoaderHooks()) {
return;
}
if (!GLOBAL_OBJ._sentryEsmLoaderHookRegistered) {
GLOBAL_OBJ._sentryEsmLoaderHookRegistered = true;
try {
const { addHookMessagePort } = createAddHookMessageChannel();
// @ts-expect-error register is available in these versions
moduleModule.register('import-in-the-middle/hook.mjs', import.meta.url, {
data: { addHookMessagePort, include: [] },
transferList: [addHookMessagePort],
});
} catch (error) {
debug.warn("Failed to register 'import-in-the-middle' hook", error);
}
}
}
export { initializeEsmLoader };
//# sourceMappingURL=esmLoader.js.map