@absolutejs/absolute 0.19.0-beta.5 → 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/index.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(resolve19(buildDir, "react", "indexes"), {
202555
202555
  force: true,
202556
202556
  recursive: true
202557
202557
  });
202558
+ const freshFilePlugin = {
202559
+ name: "hmr-fresh-files",
202560
+ setup(build3) {
202561
+ build3.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,
@@ -203987,5 +204008,5 @@ export {
203987
204008
  ANGULAR_INIT_TIMEOUT_MS
203988
204009
  };
203989
204010
 
203990
- //# debugId=1681BB757EF4C68C64756E2164756E21
204011
+ //# debugId=056CD5B04F7DDA7764756E2164756E21
203991
204012
  //# sourceMappingURL=index.js.map