@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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +23 -2
- package/dist/build.js.map +3 -3
- package/dist/dev/client/handlers/react.ts +0 -13
- package/dist/index.js +23 -2
- package/dist/index.js.map +3 -3
- package/native/packages/darwin-arm64/fast_ops.dylib +0 -0
- package/native/packages/darwin-arm64/package.json +1 -1
- package/native/packages/darwin-x64/fast_ops.dylib +0 -0
- package/native/packages/darwin-x64/package.json +1 -1
- package/native/packages/linux-arm64/package.json +1 -1
- package/native/packages/linux-x64/fast_ops.so +0 -0
- package/native/packages/linux-x64/package.json +1 -1
- package/package.json +5 -5
|
@@ -46,19 +46,6 @@ export const handleReactUpdate = (message: {
|
|
|
46
46
|
const newUrl = componentKey && message.data.manifest?.[componentKey];
|
|
47
47
|
|
|
48
48
|
if (newUrl && refreshRuntime) {
|
|
49
|
-
// If the manifest URL hasn't changed, Bun.build() read cached content
|
|
50
|
-
// (the rebuild ran before bun --hot updated). Reload instead — by the
|
|
51
|
-
// time the page loads, bun --hot will have the fresh modules.
|
|
52
|
-
const currentSrc = document.querySelector<HTMLScriptElement>(
|
|
53
|
-
'script[type="module"][src]'
|
|
54
|
-
)?.getAttribute('src');
|
|
55
|
-
const currentPath = currentSrc?.split('?')[0];
|
|
56
|
-
if (currentPath && currentPath === newUrl) {
|
|
57
|
-
window.location.reload();
|
|
58
|
-
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
49
|
applyRefreshImport(newUrl, refreshRuntime);
|
|
63
50
|
|
|
64
51
|
return;
|
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=
|
|
204011
|
+
//# debugId=056CD5B04F7DDA7764756E2164756E21
|
|
203991
204012
|
//# sourceMappingURL=index.js.map
|