@absolutejs/absolute 0.19.0-beta.732 → 0.19.0-beta.733

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
@@ -44468,6 +44468,25 @@ var init_buildReactVendor = __esm(() => {
44468
44468
  ];
44469
44469
  });
44470
44470
 
44471
+ // src/build/detectDefaultExport.ts
44472
+ var hasDefaultExport = async (specifier) => {
44473
+ try {
44474
+ const resolved = Bun.resolveSync(specifier, process.cwd());
44475
+ const content = await Bun.file(resolved).text();
44476
+ if (/\bexport\s+default\b/.test(content))
44477
+ return true;
44478
+ if (/\bexport\s*\{\s*[^}]*\bdefault\b[^}]*\}/.test(content))
44479
+ return true;
44480
+ if (/\bmodule\.exports\s*=/.test(content))
44481
+ return true;
44482
+ if (/\bexports\.default\s*=/.test(content))
44483
+ return true;
44484
+ return false;
44485
+ } catch {
44486
+ return false;
44487
+ }
44488
+ };
44489
+
44471
44490
  // src/build/buildAngularVendor.ts
44472
44491
  var exports_buildAngularVendor = {};
44473
44492
  __export(exports_buildAngularVendor, {
@@ -44577,8 +44596,12 @@ var REQUIRED_ANGULAR_SPECIFIERS, SERVER_ONLY_ANGULAR_SPECIFIERS, SCAN_SKIP_DIRS,
44577
44596
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
44578
44597
  const safeName = toSafeFileName2(specifier);
44579
44598
  const entryPath = join17(tmpDir, `${safeName}.ts`);
44580
- await Bun.write(entryPath, `export * from '${specifier}';
44581
- `);
44599
+ const includeDefault = await hasDefaultExport(specifier);
44600
+ const source = includeDefault ? `export * from '${specifier}';
44601
+ export { default } from '${specifier}';
44602
+ ` : `export * from '${specifier}';
44603
+ `;
44604
+ await Bun.write(entryPath, source);
44582
44605
  return entryPath;
44583
44606
  }));
44584
44607
  const result = await bunBuild4({
@@ -49365,8 +49388,13 @@ var toSafeFileName5 = (specifier) => specifier.replace(/\//g, "_").replace(/@/g,
49365
49388
  dep: Array.from(dep).filter(isResolvable4),
49366
49389
  framework: Array.from(framework).filter(isResolvable4)
49367
49390
  };
49368
- }, generateEntrySource2 = (specifier) => `export * from '${specifier}';
49369
- `, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
49391
+ }, generateEntrySource2 = async (specifier) => {
49392
+ const namedReexport = `export * from '${specifier}';
49393
+ `;
49394
+ const includeDefault = await hasDefaultExport(specifier);
49395
+ return includeDefault ? `${namedReexport}export { default } from '${specifier}';
49396
+ ` : namedReexport;
49397
+ }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
49370
49398
  const { readFileSync: readFileSync15 } = await import("fs");
49371
49399
  const transpiler4 = new Bun.Transpiler({ loader: "js" });
49372
49400
  const newSpecs = new Set;
@@ -49851,5 +49879,5 @@ export {
49851
49879
  build
49852
49880
  };
49853
49881
 
49854
- //# debugId=6EC71B2CE51C6EE164756E2164756E21
49882
+ //# debugId=326DF99081F5089B64756E2164756E21
49855
49883
  //# sourceMappingURL=build.js.map