@absolutejs/absolute 0.19.0-beta.717 → 0.19.0-beta.719

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.
@@ -3885,7 +3885,16 @@ ${fields}
3885
3885
  ].join(", ")}`);
3886
3886
  }
3887
3887
  const original = await fs.readFile(rawServerFile, "utf-8");
3888
- const componentClassName = `${toPascal(fileBase)}Component`;
3888
+ const detectExportedComponentClass = (source, fallback) => {
3889
+ const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
3890
+ if (defaultMatch)
3891
+ return defaultMatch[1];
3892
+ const exportClassMatch = source.match(/export\s+(?:default\s+)?class\s+([A-Za-z_$][\w$]*)/);
3893
+ if (exportClassMatch)
3894
+ return exportClassMatch[1];
3895
+ return fallback;
3896
+ };
3897
+ const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
3889
3898
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
3890
3899
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
3891
3900
  const clientFile = join5(indexesDir, jsName);
@@ -14303,5 +14312,5 @@ export {
14303
14312
  Island
14304
14313
  };
14305
14314
 
14306
- //# debugId=97C03D4F07817D1C64756E2164756E21
14315
+ //# debugId=560721F809FDA60264756E2164756E21
14307
14316
  //# sourceMappingURL=index.js.map