@absolutejs/absolute 0.19.0-beta.132 → 0.19.0-beta.133

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
@@ -171649,25 +171649,6 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
171649
171649
  htmxDir
171650
171650
  ].filter((d) => Boolean(d));
171651
171651
  const workerEntryPoints = await scanWorkerReferences(frameworkDirs);
171652
- if (hmr) {
171653
- const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
171654
- for (const outputPath of reactClientOutputPaths) {
171655
- let content = readFileSync5(outputPath, "utf-8");
171656
- let changed = false;
171657
- content = content.replace(urlPattern, (_match, relPath) => {
171658
- const targetName = basename5(relPath);
171659
- const workerSrc = workerEntryPoints.find((wp) => basename5(wp) === targetName);
171660
- if (workerSrc) {
171661
- const rel = relative7(projectRoot, workerSrc);
171662
- changed = true;
171663
- return `new URL('/@src/${rel.replace(/\\/g, "/")}', import.meta.url)`;
171664
- }
171665
- return _match;
171666
- });
171667
- if (changed)
171668
- writeFileSync3(outputPath, content);
171669
- }
171670
- }
171671
171652
  const nonReactClientLogs = nonReactClientResult?.logs ?? [];
171672
171653
  const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
171673
171654
  if (nonReactClientResult && !nonReactClientResult.success && nonReactClientLogs.length > 0) {
@@ -171698,6 +171679,29 @@ var isDev, extractBuildError = (logs, pass, label, frameworkNames, isIncremental
171698
171679
  if (vueCssResult && !vueCssResult.success && vueCssResult.logs.length > 0) {
171699
171680
  extractBuildError(vueCssResult.logs, "vue-css", "Vue CSS", frameworkNames, isIncremental, throwOnError);
171700
171681
  }
171682
+ if (hmr && workerEntryPoints.length > 0) {
171683
+ const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
171684
+ const allClientOutputPaths = [
171685
+ ...reactClientOutputPaths,
171686
+ ...nonReactClientOutputs.map((a) => a.path)
171687
+ ];
171688
+ for (const outputPath of allClientOutputPaths) {
171689
+ let content = readFileSync5(outputPath, "utf-8");
171690
+ let changed = false;
171691
+ content = content.replace(urlPattern, (_match, relPath) => {
171692
+ const targetName = basename5(relPath);
171693
+ const workerSrc = workerEntryPoints.find((wp) => basename5(wp) === targetName);
171694
+ if (workerSrc) {
171695
+ const rel = relative7(projectRoot, workerSrc);
171696
+ changed = true;
171697
+ return `new URL('/@src/${rel.replace(/\\/g, "/")}', import.meta.url)`;
171698
+ }
171699
+ return _match;
171700
+ });
171701
+ if (changed)
171702
+ writeFileSync3(outputPath, content);
171703
+ }
171704
+ }
171701
171705
  let workerOutputs = [];
171702
171706
  if (workerEntryPoints.length > 0) {
171703
171707
  const workerResult = await bunBuild6({
@@ -205069,5 +205073,5 @@ export {
205069
205073
  build
205070
205074
  };
205071
205075
 
205072
- //# debugId=208EE5F5114BBB0864756E2164756E21
205076
+ //# debugId=21A4AC39964F0D2D64756E2164756E21
205073
205077
  //# sourceMappingURL=build.js.map