@absolutejs/absolute 0.19.0-beta.6 → 0.19.0-beta.7

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
@@ -202550,17 +202550,38 @@ var parseErrorLocationFromMessage = (msg) => {
202550
202550
  vendorPaths = computeVendorPaths2();
202551
202551
  setDevVendorPaths2(vendorPaths);
202552
202552
  }
202553
- const { rmSync: rmSync2 } = await import("fs");
202553
+ const { rmSync: rmSync2, readFileSync: readFileSync9 } = await import("fs");
202554
202554
  rmSync2(resolve18(buildDir, "react", "indexes"), {
202555
202555
  force: true,
202556
202556
  recursive: true
202557
202557
  });
202558
+ const freshFilePlugin = {
202559
+ name: "hmr-fresh-files",
202560
+ setup(build2) {
202561
+ build2.onLoad({ filter: /\.(tsx?|jsx?)$/ }, (args) => {
202562
+ try {
202563
+ const contents = readFileSync9(args.path, "utf-8");
202564
+ const ext = args.path.split(".").pop() ?? "tsx";
202565
+ const loaderMap = {
202566
+ js: "js",
202567
+ jsx: "jsx",
202568
+ ts: "ts",
202569
+ tsx: "tsx"
202570
+ };
202571
+ return { contents, loader: loaderMap[ext] ?? "tsx" };
202572
+ } catch {
202573
+ return;
202574
+ }
202575
+ });
202576
+ }
202577
+ };
202558
202578
  const clientResult = await bunBuild5({
202559
202579
  entrypoints: reactEntries,
202560
202580
  format: "esm",
202561
202581
  jsx: { development: true },
202562
202582
  naming: "[dir]/[name].[hash].[ext]",
202563
202583
  outdir: buildDir,
202584
+ plugins: [freshFilePlugin],
202564
202585
  reactFastRefresh: true,
202565
202586
  root: clientRoot,
202566
202587
  splitting: true,
@@ -203653,5 +203674,5 @@ export {
203653
203674
  build
203654
203675
  };
203655
203676
 
203656
- //# debugId=1D33E4408EA8223D64756E2164756E21
203677
+ //# debugId=E07CEF692C251FFC64756E2164756E21
203657
203678
  //# sourceMappingURL=build.js.map