remote-components 0.0.30 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
30
  var render_client_exports = {};
31
31
  __export(render_client_exports, {
32
- RemoteComponentSharedRemote: () => RemoteComponentSharedRemote
32
+ RemoteComponentSharedRemote: () => RemoteComponentSharedRemote,
33
+ tryImportSharedPromise: () => tryImportSharedPromise
33
34
  });
34
35
  module.exports = __toCommonJS(render_client_exports);
35
36
  var import_jsx_runtime = (
@@ -39,7 +40,9 @@ var import_jsx_runtime = (
39
40
  var import_react = require("react");
40
41
  async function tryImportShared() {
41
42
  try {
42
- const { shared } = await import("@remote-components/shared/remote/app");
43
+ const self = globalThis;
44
+ self.TURBOPACK_REMOTE_SHARED = await import("@remote-components/shared/remote/app");
45
+ const { shared } = self.TURBOPACK_REMOTE_SHARED;
43
46
  return shared;
44
47
  } catch {
45
48
  return {};
@@ -59,6 +62,7 @@ function RemoteComponentSharedRemote({ name }) {
59
62
  }
60
63
  // Annotate the CommonJS export names for ESM import in node:
61
64
  0 && (module.exports = {
62
- RemoteComponentSharedRemote
65
+ RemoteComponentSharedRemote,
66
+ tryImportSharedPromise
63
67
  });
64
68
  //# sourceMappingURL=render-client.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/next/remote/render-client.tsx"],"sourcesContent":["'use client';\n\nimport { use } from 'react';\n\n// try to import the shared module from the remote application\n// use an empty object as a fallback if the import fails to avoid breaking the application\nasync function tryImportShared() {\n try {\n const { shared } = await import('@remote-components/shared/remote/app');\n return shared;\n } catch {\n return {};\n }\n}\n\n// create a promise singleton to import the shared module\nconst tryImportSharedPromise = tryImportShared();\n\nexport function RemoteComponentSharedRemote({ name }: { name: string }) {\n return (\n // render the shared module as a script tag\n <script\n data-remote-components-shared=\"\"\n id={`${name}_shared`}\n type=\"application/json\"\n >\n {JSON.stringify(use(tryImportSharedPromise))}\n </script>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBI;AAAA;AAAA;AAAA;AAnBJ,mBAAoB;AAIpB,eAAe,kBAAkB;AAC/B,MAAI;AACF,UAAM,EAAE,OAAO,IAAI,MAAM,OAAO,sCAAsC;AACtE,WAAO;AAAA,EACT,QAAE;AACA,WAAO,CAAC;AAAA,EACV;AACF;AAGA,MAAM,yBAAyB,gBAAgB;AAExC,SAAS,4BAA4B,EAAE,KAAK,GAAqB;AACtE,SAEE;AAAA,IAAC;AAAA;AAAA,MACC,iCAA8B;AAAA,MAC9B,IAAI,GAAG;AAAA,MACP,MAAK;AAAA,MAEJ,eAAK,cAAU,kBAAI,sBAAsB,CAAC;AAAA;AAAA,EAC7C;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../../src/next/remote/render-client.tsx"],"sourcesContent":["'use client';\n\nimport { use } from 'react';\n\n// try to import the shared module from the remote application\n// use an empty object as a fallback if the import fails to avoid breaking the application\nasync function tryImportShared() {\n try {\n const self = globalThis as unknown as {\n TURBOPACK_REMOTE_SHARED: { shared: Record<string, string> };\n };\n // this is a marker to find the shared module initializer in the Turbopack bundle\n // DO NOT REMOVE\n self.TURBOPACK_REMOTE_SHARED = await import(\n '@remote-components/shared/remote/app'\n );\n const { shared } = self.TURBOPACK_REMOTE_SHARED;\n return shared;\n } catch {\n return {};\n }\n}\n\n// create a promise singleton to import the shared module\nexport const tryImportSharedPromise = tryImportShared();\n\nexport function RemoteComponentSharedRemote({ name }: { name: string }) {\n return (\n // render the shared module as a script tag\n <script\n data-remote-components-shared=\"\"\n id={`${name}_shared`}\n type=\"application/json\"\n >\n {JSON.stringify(use(tryImportSharedPromise))}\n </script>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BI;AAAA;AAAA;AAAA;AA3BJ,mBAAoB;AAIpB,eAAe,kBAAkB;AAC/B,MAAI;AACF,UAAM,OAAO;AAKb,SAAK,0BAA0B,MAAM,OACnC,sCACF;AACA,UAAM,EAAE,OAAO,IAAI,KAAK;AACxB,WAAO;AAAA,EACT,QAAE;AACA,WAAO,CAAC;AAAA,EACV;AACF;AAGO,MAAM,yBAAyB,gBAAgB;AAE/C,SAAS,4BAA4B,EAAE,KAAK,GAAqB;AACtE,SAEE;AAAA,IAAC;AAAA;AAAA,MACC,iCAA8B;AAAA,MAC9B,IAAI,GAAG;AAAA,MACP,MAAK;AAAA,MAEJ,eAAK,cAAU,kBAAI,sBAAsB,CAAC;AAAA;AAAA,EAC7C;AAEJ;","names":[]}
@@ -1,7 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
+ declare const tryImportSharedPromise: Promise<Record<string, string>>;
3
4
  declare function RemoteComponentSharedRemote({ name }: {
4
5
  name: string;
5
6
  }): react_jsx_runtime.JSX.Element;
6
7
 
7
- export { RemoteComponentSharedRemote };
8
+ export { RemoteComponentSharedRemote, tryImportSharedPromise };
@@ -3,7 +3,9 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { use } from "react";
4
4
  async function tryImportShared() {
5
5
  try {
6
- const { shared } = await import("@remote-components/shared/remote/app");
6
+ const self = globalThis;
7
+ self.TURBOPACK_REMOTE_SHARED = await import("@remote-components/shared/remote/app");
8
+ const { shared } = self.TURBOPACK_REMOTE_SHARED;
7
9
  return shared;
8
10
  } catch {
9
11
  return {};
@@ -25,6 +27,7 @@ function RemoteComponentSharedRemote({ name }) {
25
27
  );
26
28
  }
27
29
  export {
28
- RemoteComponentSharedRemote
30
+ RemoteComponentSharedRemote,
31
+ tryImportSharedPromise
29
32
  };
30
33
  //# sourceMappingURL=render-client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/next/remote/render-client.tsx"],"sourcesContent":["'use client';\n\nimport { use } from 'react';\n\n// try to import the shared module from the remote application\n// use an empty object as a fallback if the import fails to avoid breaking the application\nasync function tryImportShared() {\n try {\n const { shared } = await import('@remote-components/shared/remote/app');\n return shared;\n } catch {\n return {};\n }\n}\n\n// create a promise singleton to import the shared module\nconst tryImportSharedPromise = tryImportShared();\n\nexport function RemoteComponentSharedRemote({ name }: { name: string }) {\n return (\n // render the shared module as a script tag\n <script\n data-remote-components-shared=\"\"\n id={`${name}_shared`}\n type=\"application/json\"\n >\n {JSON.stringify(use(tryImportSharedPromise))}\n </script>\n );\n}\n"],"mappings":";AAqBI;AAnBJ,SAAS,WAAW;AAIpB,eAAe,kBAAkB;AAC/B,MAAI;AACF,UAAM,EAAE,OAAO,IAAI,MAAM,OAAO,sCAAsC;AACtE,WAAO;AAAA,EACT,QAAE;AACA,WAAO,CAAC;AAAA,EACV;AACF;AAGA,MAAM,yBAAyB,gBAAgB;AAExC,SAAS,4BAA4B,EAAE,KAAK,GAAqB;AACtE;AAAA;AAAA,IAEE;AAAA,MAAC;AAAA;AAAA,QACC,iCAA8B;AAAA,QAC9B,IAAI,GAAG;AAAA,QACP,MAAK;AAAA,QAEJ,eAAK,UAAU,IAAI,sBAAsB,CAAC;AAAA;AAAA,IAC7C;AAAA;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../../src/next/remote/render-client.tsx"],"sourcesContent":["'use client';\n\nimport { use } from 'react';\n\n// try to import the shared module from the remote application\n// use an empty object as a fallback if the import fails to avoid breaking the application\nasync function tryImportShared() {\n try {\n const self = globalThis as unknown as {\n TURBOPACK_REMOTE_SHARED: { shared: Record<string, string> };\n };\n // this is a marker to find the shared module initializer in the Turbopack bundle\n // DO NOT REMOVE\n self.TURBOPACK_REMOTE_SHARED = await import(\n '@remote-components/shared/remote/app'\n );\n const { shared } = self.TURBOPACK_REMOTE_SHARED;\n return shared;\n } catch {\n return {};\n }\n}\n\n// create a promise singleton to import the shared module\nexport const tryImportSharedPromise = tryImportShared();\n\nexport function RemoteComponentSharedRemote({ name }: { name: string }) {\n return (\n // render the shared module as a script tag\n <script\n data-remote-components-shared=\"\"\n id={`${name}_shared`}\n type=\"application/json\"\n >\n {JSON.stringify(use(tryImportSharedPromise))}\n </script>\n );\n}\n"],"mappings":";AA6BI;AA3BJ,SAAS,WAAW;AAIpB,eAAe,kBAAkB;AAC/B,MAAI;AACF,UAAM,OAAO;AAKb,SAAK,0BAA0B,MAAM,OACnC,sCACF;AACA,UAAM,EAAE,OAAO,IAAI,KAAK;AACxB,WAAO;AAAA,EACT,QAAE;AACA,WAAO,CAAC;AAAA,EACV;AACF;AAGO,MAAM,yBAAyB,gBAAgB;AAE/C,SAAS,4BAA4B,EAAE,KAAK,GAAqB;AACtE;AAAA;AAAA,IAEE;AAAA,MAAC;AAAA;AAAA,QACC,iCAA8B;AAAA,QAC9B,IAAI,GAAG;AAAA,QACP,MAAK;AAAA,QAEJ,eAAK,UAAU,IAAI,sBAAsB,CAAC;AAAA;AAAA,IAC7C;AAAA;AAEJ;","names":[]}
@@ -212,19 +212,6 @@ async function setupWebpackRuntime(runtime, scripts = [], url = new URL(location
212
212
  }
213
213
  self.__remote_bundle_url__[bundle ?? "default"] = url;
214
214
  self.__webpack_get_script_filename__ = () => null;
215
- await initializeSharedModules(
216
- bundle ?? "default",
217
- // include all core modules as shared
218
- {
219
- react: async () => (await import("react")).default,
220
- "react-dom": async () => (await import("react-dom")).default,
221
- "react/jsx-dev-runtime": async () => (await import("react/jsx-dev-runtime")).default,
222
- "react/jsx-runtime": async () => (await import("react/jsx-runtime")).default,
223
- "react-dom/client": async () => (await import("react-dom/client")).default,
224
- ...shared
225
- },
226
- remoteShared
227
- );
228
215
  if (typeof self.__webpack_require__ !== "function" || self.__webpack_require_type__ !== "turbopack") {
229
216
  if (!self.__original_webpack_require__ && !self.__original_webpack_chunk_load__) {
230
217
  self.__original_webpack_chunk_load__ = self.__webpack_chunk_load__;
@@ -249,6 +236,19 @@ async function setupWebpackRuntime(runtime, scripts = [], url = new URL(location
249
236
  })
250
237
  );
251
238
  }
239
+ await initializeSharedModules(
240
+ bundle ?? "default",
241
+ // include all core modules as shared
242
+ {
243
+ react: async () => (await import("react")).default,
244
+ "react-dom": async () => (await import("react-dom")).default,
245
+ "react/jsx-dev-runtime": async () => (await import("react/jsx-dev-runtime")).default,
246
+ "react/jsx-runtime": async () => (await import("react/jsx-runtime")).default,
247
+ "react-dom/client": async () => (await import("react-dom/client")).default,
248
+ ...shared
249
+ },
250
+ remoteShared
251
+ );
252
252
  }
253
253
  function createChunkLoader(runtime) {
254
254
  return function __turbopack_chunk_load__(chunkId, scriptBundle) {
@@ -326,6 +326,7 @@ async function handleTurbopackChunk(code, bundle, url) {
326
326
  });
327
327
  const scriptUrl = URL.createObjectURL(blob);
328
328
  const script = document.createElement("script");
329
+ script.setAttribute("data-turbopack-src", url);
329
330
  script.src = scriptUrl;
330
331
  script.async = true;
331
332
  script.onload = () => {
@@ -400,17 +401,84 @@ function createModuleRequire(runtime) {
400
401
  }
401
402
  };
402
403
  }
403
- function initializeSharedModules(bundle, shared = {}, remoteShared = {}) {
404
+ async function initializeSharedModules(bundle, hostShared = {}, remoteShared = {}) {
404
405
  const self = globalThis;
405
406
  self.__remote_shared_modules__ = self.__remote_shared_modules__ ?? {};
406
407
  if (!self.__remote_shared_modules__[bundle]) {
407
408
  self.__remote_shared_modules__[bundle] = {};
408
409
  }
410
+ const bundleKey = getBundleKey(bundle);
411
+ const modules = self[`TURBOPACK_${bundleKey}`];
412
+ let sharedModuleInitializer = null;
413
+ if (modules && Array.isArray(modules)) {
414
+ const allModules = modules.flat();
415
+ const sharedModuleInitializerIndex = allModules.findIndex((idOrFunc) => {
416
+ if (typeof idOrFunc !== "function") {
417
+ return false;
418
+ }
419
+ const funcCode = idOrFunc.toString();
420
+ return /[a-z]\.TURBOPACK_REMOTE_SHARED/.test(funcCode);
421
+ });
422
+ if (sharedModuleInitializerIndex > 0) {
423
+ const sharedModuleInitializerCode = allModules[sharedModuleInitializerIndex].toString();
424
+ const sharedModuleInitializerId = allModules[sharedModuleInitializerIndex - 1];
425
+ const { sharedModuleId } = /\.TURBOPACK_REMOTE_SHARED=await e\.A\((?<sharedModuleId>[0-9]+)\)/.exec(
426
+ sharedModuleInitializerCode
427
+ )?.groups ?? {};
428
+ if (sharedModuleId) {
429
+ const { default: sharedModuleInitializerInstance } = handleTurbopackModule(
430
+ bundle,
431
+ sharedModuleId,
432
+ `[${bundle}] ${sharedModuleInitializerId}`
433
+ );
434
+ sharedModuleInitializer = sharedModuleInitializerInstance;
435
+ }
436
+ }
437
+ if (sharedModuleInitializer) {
438
+ const { shared } = await sharedModuleInitializer;
439
+ const sharedModuleIds = Object.entries(shared).filter(([, value]) => typeof value === "function").reduce((acc, [key, value]) => {
440
+ const { asyncSharedModuleId } = /e\.A\((?<asyncSharedModuleId>[0-9]+)\)/.exec(value.toString())?.groups ?? {};
441
+ if (asyncSharedModuleId) {
442
+ const asyncSharedModuleIdNumber = Number(asyncSharedModuleId);
443
+ let asyncSharedModule;
444
+ const newAllModules = self[`TURBOPACK_${bundleKey}`]?.flat() ?? [];
445
+ const asyncSharedModuleIdIndex = newAllModules.indexOf(
446
+ asyncSharedModuleIdNumber
447
+ );
448
+ if (asyncSharedModuleIdIndex !== -1 && typeof newAllModules[asyncSharedModuleIdIndex + 1] === "function") {
449
+ asyncSharedModule = newAllModules[asyncSharedModuleIdIndex + 1];
450
+ }
451
+ if (asyncSharedModule) {
452
+ const asyncSharedModuleCode = asyncSharedModule.toString();
453
+ const { sharedModuleId } = /e=>{e\.v\(e=>Promise\.resolve\(\)\.then\(\(\)=>e\((?<sharedModuleId>[0-9]+)\)\)\)}/.exec(
454
+ asyncSharedModuleCode
455
+ )?.groups ?? /e=>{e\.v\(t=>Promise\.all\(\["[^"]+"\].map\(t=>e\.l\(t\)\)\)\.then\(\(\)=>t\((?<sharedModuleId>[0-9]+)\)\)\)}/.exec(
456
+ asyncSharedModuleCode
457
+ )?.groups ?? {};
458
+ acc[sharedModuleId ?? asyncSharedModuleId] = key.replace(
459
+ "__remote_shared_module_",
460
+ ""
461
+ );
462
+ }
463
+ }
464
+ return acc;
465
+ }, {});
466
+ return Promise.all(
467
+ Object.entries(sharedModuleIds).map(async ([id, module2]) => {
468
+ if (self.__remote_shared_modules__?.[bundle]) {
469
+ if (hostShared[module2]) {
470
+ self.__remote_shared_modules__[bundle][id] = await hostShared[module2](bundle);
471
+ }
472
+ }
473
+ })
474
+ );
475
+ }
476
+ }
409
477
  return Promise.all(
410
478
  Object.entries(remoteShared).map(async ([id, module2]) => {
411
479
  if (self.__remote_shared_modules__?.[bundle]) {
412
- if (shared[module2]) {
413
- self.__remote_shared_modules__[bundle][id.replace("[app-ssr]", "[app-client]")] = await shared[module2](bundle);
480
+ if (hostShared[module2]) {
481
+ self.__remote_shared_modules__[bundle][id.replace("[app-ssr]", "[app-client]")] = await hostShared[module2](bundle);
414
482
  } else {
415
483
  console.error(`Shared module "${module2}" not found for "${bundle}".`);
416
484
  }
@@ -434,28 +502,25 @@ function handleTurbopackModule(bundle, moduleId, id) {
434
502
  const bundleKey = getBundleKey(bundle);
435
503
  const modules = self[`TURBOPACK_${bundleKey}`];
436
504
  let moduleInit;
437
- for (const mod of modules ?? []) {
438
- if (typeof mod[1] === "string") {
439
- let index = mod.indexOf(moduleId);
440
- if (index === -1) {
441
- index = mod.findIndex(
442
- (m) => typeof m === "string" && m.startsWith(moduleId)
443
- );
444
- }
445
- if (index !== -1) {
446
- while (typeof mod[index] !== "function" && index < mod.length) {
447
- index++;
448
- }
449
- moduleInit = mod[index];
450
- break;
451
- }
452
- } else {
453
- const map = mod[1];
454
- if (moduleId in map) {
455
- moduleInit = map[moduleId];
456
- break;
505
+ const allModules = modules?.flat() ?? [];
506
+ if (typeof allModules[1] === "string" || typeof allModules[1] === "number") {
507
+ const normalizedId = /^[0-9]+$/.test(moduleId) ? Number(moduleId) : moduleId;
508
+ let moduleIdIndex = allModules.indexOf(normalizedId);
509
+ if (moduleIdIndex === -1) {
510
+ moduleIdIndex = allModules.findIndex(
511
+ (bundleEntry) => typeof bundleEntry === "string" && bundleEntry.startsWith(moduleId) || bundleEntry === normalizedId
512
+ );
513
+ }
514
+ if (moduleIdIndex !== -1) {
515
+ while (typeof allModules[moduleIdIndex] !== "function" && moduleIdIndex < allModules.length) {
516
+ moduleIdIndex++;
457
517
  }
518
+ moduleInit = allModules[moduleIdIndex];
458
519
  }
520
+ } else {
521
+ moduleInit = allModules.find(
522
+ (bundleEntry) => typeof bundleEntry === "object" && bundleEntry !== null && moduleId in bundleEntry
523
+ )?.[moduleId];
459
524
  }
460
525
  const exports = {};
461
526
  const moduleExports = { exports };
@@ -495,6 +560,7 @@ function handleTurbopackModule(bundle, moduleId, id) {
495
560
  };
496
561
  }
497
562
  },
563
+ // define exports
498
564
  s(m) {
499
565
  let mod = m;
500
566
  if (Array.isArray(m)) {
@@ -518,18 +584,29 @@ function handleTurbopackModule(bundle, moduleId, id) {
518
584
  exportNames.add(key);
519
585
  }
520
586
  },
521
- i(iid) {
522
- const { exportSource, exportName } = /\s+<export (?<exportSource>.*?) as (?<exportName>.*?)>$/.exec(iid)?.groups ?? {};
523
- const normalizedId = iid.replace(/\s+<export(?<specifier>.*)>$/, "");
524
- const mod = self.__webpack_require__?.(
525
- `[${bundle}] ${normalizedId}`
526
- );
527
- if (exportSource && exportName && (exportSource === "*" || typeof mod[exportSource] !== "undefined") && typeof mod[exportName] === "undefined") {
528
- if (exportSource === "*") {
529
- mod[exportName] = mod;
530
- } else {
531
- mod[exportName] = mod[exportSource];
587
+ // import ESM
588
+ i(importId) {
589
+ let mod;
590
+ if (typeof importId === "string") {
591
+ const { exportSource, exportName } = /\s+<export (?<exportSource>.*?) as (?<exportName>.*?)>$/.exec(
592
+ importId
593
+ )?.groups ?? {};
594
+ const normalizedId = importId.replace(
595
+ /\s+<export(?<specifier>.*)>$/,
596
+ ""
597
+ );
598
+ mod = self.__webpack_require__?.(
599
+ `[${bundle}] ${normalizedId}`
600
+ );
601
+ if (exportSource && exportName && (exportSource === "*" || typeof mod[exportSource] !== "undefined") && typeof mod[exportName] === "undefined") {
602
+ if (exportSource === "*") {
603
+ mod[exportName] = mod;
604
+ } else {
605
+ mod[exportName] = mod[exportSource];
606
+ }
532
607
  }
608
+ } else {
609
+ mod = self.__webpack_require__?.(`[${bundle}] ${importId}`);
533
610
  }
534
611
  if (!("default" in mod) && mod.toString() !== "[object Module]") {
535
612
  try {
@@ -539,12 +616,21 @@ function handleTurbopackModule(bundle, moduleId, id) {
539
616
  }
540
617
  return mod;
541
618
  },
542
- r(rid) {
543
- return self.__webpack_require__?.(`[${bundle}] ${rid}`);
619
+ // require
620
+ r(requireId) {
621
+ return self.__webpack_require__?.(`[${bundle}] ${requireId}`);
544
622
  },
623
+ // value exports
545
624
  v(value) {
546
- exports.default = value;
625
+ if (typeof value === "function") {
626
+ exports.default = value((vid) => {
627
+ return self.__webpack_require__?.(`[${bundle}] ${vid}`);
628
+ });
629
+ } else {
630
+ exports.default = value;
631
+ }
547
632
  },
633
+ // async module initializer
548
634
  async a(mod) {
549
635
  let result;
550
636
  await mod(
@@ -554,12 +640,30 @@ function handleTurbopackModule(bundle, moduleId, id) {
554
640
  );
555
641
  exports.default = result;
556
642
  },
643
+ // async module loader
557
644
  async A(Aid) {
558
645
  const mod = self.__webpack_require__?.(`[${bundle}] ${Aid}`);
559
646
  return mod.default(
560
647
  (parentId) => self.__webpack_require__?.(`[${bundle}] ${parentId}`)
561
648
  );
562
649
  },
650
+ // chunk loader
651
+ l(url) {
652
+ const moduleInitIndex = allModules.indexOf(moduleInit);
653
+ if (moduleInitIndex !== -1) {
654
+ const scriptIndex = allModules.slice(0, moduleInitIndex).findLastIndex((bundleEntry) => bundleEntry instanceof Element);
655
+ if (scriptIndex !== -1) {
656
+ const script = allModules[scriptIndex];
657
+ const scriptSrc = script.getAttribute("data-turbopack-src") || "";
658
+ const nextIndex = scriptSrc.indexOf("/_next");
659
+ const baseUrl = nextIndex !== -1 ? scriptSrc.slice(0, nextIndex) : "";
660
+ const bundleUrl = `[${bundle}] ${baseUrl}/_next/${url}`;
661
+ return self.__webpack_chunk_load__?.(bundleUrl, bundle);
662
+ }
663
+ }
664
+ throw new Error(`Failed to load chunk ${url} for module ${id}`);
665
+ },
666
+ // global
563
667
  g: self.__remote_components_turbopack_global__[bundle],
564
668
  m: moduleExports,
565
669
  e: exports