@absolutejs/absolute 0.19.0-beta.103 → 0.19.0-beta.105

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.
package/dist/index.js CHANGED
@@ -171640,6 +171640,19 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
171640
171640
  }
171641
171641
  const reactClientLogs = reactClientResult?.logs ?? [];
171642
171642
  const reactClientOutputs = reactClientResult?.outputs ?? [];
171643
+ if (hmr && reactClientOutputs.length > 0) {
171644
+ const REFRESH_NOOP = "window.$RefreshReg$||(window.$RefreshReg$=function(){});window.$RefreshSig$||(window.$RefreshSig$=function(){return function(t){return t}});";
171645
+ for (const output of reactClientOutputs) {
171646
+ if (output.kind !== "entry-point")
171647
+ continue;
171648
+ try {
171649
+ const content = await Bun.file(output.path).text();
171650
+ if (content.includes(REFRESH_NOOP)) {
171651
+ writeFileSync3(output.path, content.replace(REFRESH_NOOP, "").replace(/^\n/, ""));
171652
+ }
171653
+ } catch {}
171654
+ }
171655
+ }
171643
171656
  if (reactClientResult && !reactClientResult.success && reactClientLogs.length > 0) {
171644
171657
  extractBuildError(reactClientLogs, "react-client", "React client", frameworkNames, isIncremental, throwOnError);
171645
171658
  }
@@ -203484,6 +203497,18 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
203484
203497
  if (vendorPaths) {
203485
203498
  await rewriteReactImports2(clientResult.outputs.map((art) => art.path), vendorPaths);
203486
203499
  }
203500
+ const { readFileSync: readFs, writeFileSync: writeFs } = await import("fs");
203501
+ const REFRESH_NOOP = "window.$RefreshReg$||(window.$RefreshReg$=function(){});window.$RefreshSig$||(window.$RefreshSig$=function(){return function(t){return t}});";
203502
+ for (const output of clientResult.outputs) {
203503
+ if (output.kind !== "entry-point")
203504
+ continue;
203505
+ try {
203506
+ const content = readFs(output.path, "utf-8");
203507
+ if (content.includes(REFRESH_NOOP)) {
203508
+ writeFs(output.path, content.replace(REFRESH_NOOP, "").replace(/^\n/, ""));
203509
+ }
203510
+ } catch {}
203511
+ }
203487
203512
  const clientManifest = generateManifest2(clientResult.outputs, buildDir);
203488
203513
  Object.assign(state.manifest, clientManifest);
203489
203514
  await populateAssetStore(state.assetStore, clientManifest, buildDir);
@@ -205323,5 +205348,5 @@ export {
205323
205348
  ANGULAR_INIT_TIMEOUT_MS
205324
205349
  };
205325
205350
 
205326
- //# debugId=8B0D6BD8707201AE64756E2164756E21
205351
+ //# debugId=0BA452EB4E084FF464756E2164756E21
205327
205352
  //# sourceMappingURL=index.js.map