@absolutejs/absolute 0.19.0-beta.718 → 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.
package/dist/build.js CHANGED
@@ -44164,7 +44164,16 @@ ${fields}
44164
44164
  ].join(", ")}`);
44165
44165
  }
44166
44166
  const original = await fs2.readFile(rawServerFile, "utf-8");
44167
- const componentClassName = `${toPascal(fileBase)}Component`;
44167
+ const detectExportedComponentClass = (source, fallback) => {
44168
+ const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
44169
+ if (defaultMatch)
44170
+ return defaultMatch[1];
44171
+ const exportClassMatch = source.match(/export\s+(?:default\s+)?class\s+([A-Za-z_$][\w$]*)/);
44172
+ if (exportClassMatch)
44173
+ return exportClassMatch[1];
44174
+ return fallback;
44175
+ };
44176
+ const componentClassName = detectExportedComponentClass(original, `${toPascal(fileBase)}Component`);
44168
44177
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
44169
44178
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
44170
44179
  const clientFile = join15(indexesDir, jsName);
@@ -49763,5 +49772,5 @@ export {
49763
49772
  build
49764
49773
  };
49765
49774
 
49766
- //# debugId=1B1EC4DE6F19148564756E2164756E21
49775
+ //# debugId=EEC6828C2FD3553D64756E2164756E21
49767
49776
  //# sourceMappingURL=build.js.map